[thelist] (JS) getElementById

Iva Koberg iva at livestoryboard.com
Mon Jul 7 15:23:38 CDT 2003


Hi Stephen,
It's failing because you have the call in the head, it get's executed
before the document has loaded... Therefore you get an error saying that
there is no such element -- correctly. If you put your JS in a function
and call it on body.onload or whenever appropriate (after the doc has
loaded), it will work.

best,
Iva.

Iva A. Koberg - liveSTORYBOARD, Inc. 
-------------------------------------------------------------
Simple, powerful, secure Web Content Management
-------------------------------------------------------------
2 Clarence Place #5, San Francisco, CA 94107
tel: 415.615.9079
fax: 415-615-9036
www.livestoryboard.com

>> -----Original Message-----
>> From: thelist-bounces at lists.evolt.org 
>> [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Stephen Caudill
>> Sent: Monday, July 07, 2003 12:17 PM
>> To: thelist at lists.evolt.org
>> Subject: [thelist] (JS) getElementById
>> 
>> 
>> 'lo all!
>>   Can someone tell me why this:
>> 
>> document.getElementById("contact").style.color = '#ffcc00';
>> 
>> is not working?  if you'd like to see the page it's in:
>> 
http://www.mccinnovations.com/support/faq_old.asp


TIA,
Stephen
-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

Evolt.org conference in London, July 25-27 2003.  Register today at
http://evolt.org.uk

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 





More information about the thelist mailing list