Results 1 to 3 of 3

Thread: Change the background of an empty table cell when a link on other cell is clicked

  1. #1
    Join Date
    Nov 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Change the background of an empty table cell when a link on other cell is clicked

    Hi ,

    Can anybody suggest as to how to go about when--

    the background of an empty table cell has to be changed when a hyperlink on another table cell is clicked.

    The background has to be changed either by using colour/image or class .

    Rads

  2. #2
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Try something like this:

    <table width="200"><tr>
    <td id="empty" width="100">
    <td width="100"><a href="#" onclick="document.getElementById('empty').style.backgroundColor = 'red';">Click the link</a></td></tr></table>

    When you click the link the background of the other table cell should change to red.

    Jim
    Last edited by Jim D'Amato; 12-18-2005 at 02:49 AM.

  3. #3
    Join Date
    Oct 2005
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    cant remember where it was, but there was a javascript forum post here on dd about how to do this, i think the answer i used was given by jscheurer on that thread (like i said, cant remember which, try searchin for it)

Bookmarks

Posting Permissions

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