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/.
