Dear all
I encountered a problem to generate a zebra stripe table. My program is
no problem when the page is first load. But after the form_remote_tag
submitted, the prototype script could not addClassName to the new table
tr element. Any one know what is going wrong??
Furthermore, is it good practice for inline prototype script in
_event_list.html.erb?
Thank you very much
Valentino
index.html.erb
…
…
_event_list.html.erb
…
… code to generate the table …
…
event_controller.rb
def index
…
…
if request.xml_http_request?
respond_to do |format|
format.html {render :partial => “event_list”}
end
end
end