Prototype Event.observe doesn't work in partial

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
…
…

<%= render :partial => 'event_list' %>

_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

I suspect the Event.observe(window, ‘load’, stripe, true); is not
executed after an AJAX call, and you will have to call your stripe()
function explicitly.

Cheers,
Nicholas

On Jun 30, 6:12 am, Valentino L. [email protected]