[thelist] A JavaScript question

Thompson, Daniel Daniel.Thompson at fishnetsecurity.com
Fri Sep 19 17:00:18 CDT 2003

> and so this kinda thing: <a href="" class="menuText" 
> onMouseOver= 
> "document.getElementById('menu11').style.background-color = 
> '#FFFFFF';"> Editorial</a></td> should change the table cell 
> background to white when I roll over the link.
> Of course, it doesn't work. Actually it doesn't throw an 
> error either. Now I've come a cropper with getElementById 


JavaScript styles and CSS styles are different.

Try "backgroundColor" instead.

However, what you'd like to do is possible through pure
CSS: the trick is setting you're anchor element to
display:block and a width of 100%. Then, change the
Background-color (not backgroundColor) to white.

The bonus is that JavaScript isn't required.


The information transmitted in this e-mail is intended only for the addressee and may contain confidential and/or privileged material. 
Any interception, review, retransmission, dissemination, or other use of, or taking of any action upon this information by persons or entities
other than the intended recipient is prohibited by law and may subject them to criminal or civil liability. If you received this communication 
in error, please contact us immediately at 816.421.6611, and delete the communication from any computer or network system.

More information about the thelist mailing list