Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
01-15-2013, 08:40 PM #1
- Join Date
- Sep 2011
- Thanked 0 Times in 0 Posts
Unhighlighting the last clicked row in a table
The below code works great except for the fact that it does not unhighlight the last row that was clicked on. For example, if I were to click on a new row, it would change color which is perfect.
However, if I were to select another row, the previous selected row does not change back to its default color (white). How can the code below be modified so as to restore the previous clicked row to its original color if a new row has been clicked on?
01-15-2013, 08:46 PM #2
- Join Date
- Sep 2005
- Sydney, Australia
- Thanked 624 Times in 614 Posts
You need to add a loop that sets all rows to the default colour before changing the colour of the one that was clicked on.
Users who have thanked felgall for this post:
01-15-2013, 08:48 PM #3
My original code did it all correctly. Why did you stop using it?An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Users who have thanked Old Pedant for this post: