Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    Oregon, United States of America
    Posts
    882
    Thanks
    1
    Thanked 9 Times in 9 Posts

    <td> background color on mouseOver

    PHP Code:
    function GreyON(change) {
        
    document.getElementById(change).style.backgroundColor "B9B9B9";

    CSS wont work for me because i need to change multiple <td>'s on one mouseover. However the above script isnt working.

    I also tried:

    PHP Code:
    function GreyON(change) {
        
    document.getElementById(change).className "ThisClassON";

    This did not work either. What can i do?
    If I'm postin here, I NEED YOUR HELP!!

  • #2
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    /me engages his psychic powers

    I sense a problem with your code.
    Forget style. Code to semantics. Seperate style from structure, and structure from behaviour.
    I code to specs, and test only in Firefox (unless stated otherwise).


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •