I need a table with selectable rows (there is a check box in every row). All selected rows should be displayed with different style than rows which are not selected. I implemented this behavior by assigning the css-defined class to <tr> tag
<tr id=<%="msgrow_#{m.id}"%> class="unchecked_msg">
and toggling the class whenever checkbox is clicked.
<%= check_box_tag("checked_messages", object.id, false, :class=>"selectable_msg", :align=>"top", :onchange => "$ ('msgrow_#{object.id}').toggleClassName('checked_msg', 'unchecked_msg');") %>
It works fine until user refreshes page. After the refresh checkbox is still checked, but the class of the row is reset to "unchecked_msg". Anyone has an idea how to survive page refresh?
thanks, Adam