Image_select_tag with name and value

What have I missed

I have a .rhtml with the sandard form parameters

<%= image_submit_tag(“excel.gif”, :alt => “Download List to Excel”,
:border => 0, :name => ‘render_action’, :value => ‘excel’ ) %>

Which genenerates I believe a valid html fragment for a submit button.

BUT my controller doesnt pick up the value of params[:render_action] ?

if params[:render_action].nil?
     render
  else
   mytext = render_to_string(:action => 'list_excel', :layout => 

false)
send_data mytext, :type => ‘application/vnd.ms-excel’,
:disposition => ‘inline’
end

It works if I create a standard check box tag
Download Results to Excel:<%= check_box_tag (“render_action”,
value=“excel” ) %> but I want it this to work as a check_box button.

What am I doing wrong?

Why not create a hidden field to hold the value?

-jwm

Jonathon M. wrote:

Why not create a hidden field to hold the value?

-jwm

I actually want two submit buttons

a) Standard submit button which just does a submit “View”
b) Submit with “render_action” excel “View with Excel”

If I have a hidden field with the render action then if the user clicks
the standard button the hidden field value would result the render to
excel whichever button is clicked.