Alex said the following on 2/27/2006 12:34 AM:
> Trying to change a few tags by swapping color values to my own. It
> doesn't give any error, yet it doesn't perform. Is there an error in my
> logic somewhere?
>
> var my_i = document.getElementsByTagName( 'td' );
> for (i = 0; i < my_i.length; i++)
> {
if (my_i[i].style.backgroundColor == '#f7fffb')
{
my_i[i].style.backgroundColor = '#00ff00';
}
You may want to use toLowerCase() on the backgroundColor if you are not
sure of the Case of the color codes.
--
Randy
comp.lang.javascript FAQ -
http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/