Here is my code: <input type="text" id="search_form" name="search" /> <%= observe_field ''search_form'', :frequency => 0.5, :update => ''results'', :url => { :controller => ''programs'', :action=> ''get_results'', :search_type => select_type }, # an error occurs :with => "''search_text='' + escape(value)"%> <%= select "select","type",{"BOY" => ''1'', "Girl" => ''2''}%> Can anyone tell me how to pass the value of the select box when i call "get_results"? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hey, guys I want to get the value of select box when i call the action "get_result". Here is my code. ******************************************************************************************************************* <input type="text" id="search_form" name="search" /> <%= observe_field ''search_form'', :frequency => 0.5, :update => ''results'', :url => { :controller => ''programs'', :action=> ''get_results'', :search_type => ''select_type'' }, :with => "''search_text='' + escape(value)"%> <%= select "select","type",{"BOY" => ''1'', "Girl" => ''2''}%> ******************************************************************************************************************* But i only get a string "select_type" every time. Can you tell me how to deal with it? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
BTW, if i replace "observe_field" to "observe_form", a http post request will be sent every time when i refresh the page. On 4月25日, 上午10时44分, Leo <pollingb...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey, guys > > I want to get thevalueof select box when i call the action > "get_result". > Here is my code. > ******************************************************************************************************************* > <input type="text" id="search_form" name="search" /> > <%= observe_field ''search_form'', > :frequency => 0.5, > :update => ''results'', > :url => { :controller => ''programs'', :action=> > ''get_results'', > :search_type => ''select_type'' }, > :with => "''search_text='' +escape(value)"%> > <%= select "select","type",{"BOY" => ''1'', "Girl" => ''2''}%> > ******************************************************************************************************************* > But i only get a string "select_type" every time. Can you tell me how > to deal with it? > Thanks.--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---