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
    New Coder
    Join Date
    Dec 2002
    Location
    Washington State
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change TABLE <TD> bgcolor onClick Link

    What I am trying to do is change the <TD NAME="ME">HI</TD> bgcolor when I click on a link somewhere other then inside the table. Any comments or suggestions would greatly be appreciated. Thanks.


    ~Isaac~
    ~ Isaac Lloyd ~
    Website Design & Development
    http://www.IsaacLloyd.com

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Code:
    <table>
    <tr>
    <td id="me">The background color of this cell should change color on click</td>
    </tr>
    </table>
    <a href="#" onclick="document.getElementById('me').style.background='#000099';return false">Change background color of cell</a>


  •  

    Posting Permissions

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