[thelist] (JS) getElementById
Joshua Olson
joshua at waetech.com
Mon Jul 7 15:19:07 CDT 2003
----- Original Message -----
From: "Stephen Caudill" <SCaudill at municode.com>
Sent: Monday, July 07, 2003 4:16 PM
> 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
Stephen,
If I had to venture a guess, I'd say it's because the script is executing
before the document element "contact" is added to the DOM.
Here's a couple options:
1. Put the script below the declaration of the element.
2. Make the script execute only one the page is fully loaded.
<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com
706.210.0168
More information about the thelist
mailing list