hi,
im trying to build a ajaxified remote_form_for. this looks like that:
<% remote_form_for :search, :url => { :action => “index”} , :method =>
“get”
, :loading => “$(‘divSearchWiP’).show();”, :loaded =>
“$(‘divSearchWiP’).hide();” do %>
…
<%= submit_tag “Search” %>
the form above sits in the index view. the index action does a page
replaceL=:
render :update do |page|
page.replace_html ‘divsearchResults’, :partial =>
“results”
end #end render
also, the partial ‘results’ contains a dropdown to provide a selection
of
sortmethods:
<%=
select_tag “fieldSort”, options_for_select(@arrSortFields,
@arrSortFieldsSel.to_s) , :onchange =>
“$(‘hidfieldSort’).value=$(‘fieldSort’).value;document.forms[0].submit();”
%>
facts& faqs:
- searching works, it the form triggers an ajax call although the
html-source tells me its a POST call - since its a POST, “submit” hits the create action
- if i add :html=>{ to the form-tag, i the call goes directly into the
create action.
how can i get the GET right?
thx