Re: Table selection highlight

Discussion in 'HTML' started by Thomas Mlynarczyk, Nov 8, 2004.

  1. Also sprach Steve West:

    > I have a table with onclick color settings for each <td>. I want to
    > change the color of the table data. This works ok. But now I want to
    > change the color back when I click on another <td>. I tried putting a
    > onclick color in the main table but this does not work. Any ideas?


    Store the id of the clicked element in a variable: Upon each click event,
    check if that variable is set, and if so, reset the corresponding color.
    Then set the variable to the current element and change its color.

    Alternative: onfocus="this.style.color=hilight;"
    onblur="this.style.color=normal;" (untested)
     
    Thomas Mlynarczyk, Nov 8, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Karl Seguin
    Replies:
    3
    Views:
    2,315
    John Morgan
    Feb 10, 2004
  2. =?Utf-8?B?YmFjazJncmlk?=

    highlight datagrid row on radiobutton selection

    =?Utf-8?B?YmFjazJncmlk?=, Sep 13, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    488
    =?Utf-8?B?YmFjazJncmlk?=
    Sep 13, 2004
  3. news.rcn.com
    Replies:
    1
    Views:
    9,801
    Chris Smith
    Jul 12, 2004
  4. Simon Niederberger
    Replies:
    2
    Views:
    16,793
    Christian Kaufhold
    Jan 7, 2005
  5. Replies:
    2
    Views:
    194
Loading...

Share This Page