Is there a way to get rid of the "onclick" here and just set the
highlight if the book.title == session[:book][:title]?  The javascript
works fine for the onclick, but I want to highlight when the page
loads...

<% @books_by_subject.each do |book| %>

   <% if book.title == session[:book][:title] %>
         <tr onClick="HighLightTR(this,'#7C3C3C','#000000');"><td><a
href="/chapters<%=   book.id %>"><%= book.title %></a></td> </tr>
    <% else %>
          <tr><td><a href="/chapters/<%= book.id %>"><%= book.title
%></a></td> </tr>
   <% end %>

<% end %>

Thanks,
Dave

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to