joshua asem
2006-Jun-15 15:28 UTC
[Rails] retrieving parameter or selected value using remote_function
Hi, Can anyone let me know how to fetch selected option from the following select box : <%= select(:category_view,:name,@categories_choices, {:include_blank => false}, {:onChange =>remote_function(:update => "div_team_coverage", :url => {:action => :set_team_values} ,:with => "category="+ escape(value))} ) %> <div id="div_team_coverage"> <%= render(:partial => "team_coverage_data")%> </div> And I want to know how can I access this in the controller. When I try to access in controller as : params[:category_view][:name] I got nil params exception. As i need it eagerly to fetch the value selected on first select box, and base on that i need to populate data in the second select box from the database. Thanks in advance. Joshua -- Posted via http://www.ruby-forum.com/.
Seemingly Similar Threads
- Passing values selected with onchange remote_function
- Using link_to_remote/remote_function outside of a Controller
- Converting rails 2 to 3 remote_function error
- can't get remote_function working on rails 2.3.2
- Issue with radiobutton and remote_function in IE.