I have a select box in my view, with an option for select, a variable
for selected value, and an Ajax observe_field
<select name="most[criteria]" id="most_criteria"
style="display:inline;width:12em;" >
<%= options_for_select({ "most cheerful" => "1",
"most beautiful" =>
"2", "most displayed" => "3"}, @sort_criteria)
%>
</select>
<%= observe_field("most_criteria",
:update => "results_table",
:url => { :action => :list , :params =>
@params.merge({:page=> nil })},
:with => "''sort=''+value",
:on => "changed")
%>
when changed I get the params[:sort] set to the seelcted value....
but setting @sort_criteria to params[:sort] doesn''t select anything at
all...
what''s the correct params to be set ?
tfyh
kad
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---