Observe_form that doesn't observe

Hello,

I’ve got a form which contains a select and a text field, and I’d like
to have a listener on them to use some Ajax after.

I tried this way :

Filter on item : <%=select_tag :field , options_for_select(@class.new.columns_name_hash, params[:field])%> <%=text_field_tag("query", params[:query], :size => 10 ) %>

<%= image_tag(“spinner.gif”,
:align => “absmiddle”,
:border => 0,
:id => “spinner”,
:style =>“display: none;” ) %>

<%= observe_form 'sform',
  :update => :table,
  :before => "Element.show(’spinner’)",
  :success => "Element.hide(’spinner’)",
  :url => {:action => :user, :todo=>:list},
  :with => "Form.serialize('sform')" %>
<%= render :partial=> 'shared/listing'%>

But it doesn’t work, basically the Ajax does nothing (the logs doesn’t
show any request), however if I try to submit the form in the “normal
way” (just pressing enter for instance), it works well.

Do you have any idea?

Thanks a lot

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs