On 25 May 2006, at 05:57, Michael T. wrote:
it inline since the changes are minor. For the actual change, look
into using prototypes Element.addClassName method.
Alternatively, if you just want to simplify, just review the
referenced prototype page and use it inline like they are doing it.
The example there is exactly what you want.
I’m broadening the original question somewhat: what would be the most
effective way to implement selection in alternating rows tables?
So basically, you have one
with class ‘selected’, you click on a
different row, then the first
gets his empty or ‘odd’ class back
(depending on what color the row should have as it’s alternating) and
the clicked row gets the ‘selected’ class.
Currently, I’m storing the selected row id in a session, looping
s of the table just to change 2 rows seems very
ineffective to me.
Anyone have a better and cleaner idea on how to do this? (as a test,
use a table with about 500 rows in it, for performance comparison)
Peter De Berdt