Select menu problem

I have the following code:

<%= start_form_tag :action => ‘index’, :sort => params[:my_select_box]
%>

Sort Alphabetically Sort by Rating

The problem is the first time the form gets submitted
params[:my_select_box] is empty and so nothing happens. All I want to do
is pass one of the values directly into the method.

Another problem is when the page refreshes, the same thing is selected
in the menu. I would like the option the user picked to be the currently
selected one.

Thanks in advance

DAve wrote:

I have the following code:

<%= start_form_tag :action => ‘index’, :sort => params[:my_select_box]
%>

Sort Alphabetically Sort by Rating

The problem is the first time the form gets submitted
params[:my_select_box] is empty and so nothing happens. All I want to do
is pass one of the values directly into the method.

Another problem is when the page refreshes, the same thing is selected
in the menu. I would like the option the user picked to be the currently
selected one.

Thanks in advance

Has nobody run into this problem before :frowning: ? I’ve searched high and low
on google to no avail.