Select_tag onchange problem

Hi Everyone,
here is my code,

<%= start_form_tag :action => ‘update’, :id => @announcement, :multipart
=> true %>
<%= select_tag “announcement_select”,
options_from_collection_for_select(@announcement_list, “id”, “title”),
:multiple => true, :size => 7, :style =>“width:300”, :onchange =>
“document.location.href=’/announcement/index’” %>
<%= end_form_tag %>

what i want is to post this page to itself (controller name -

announcement) with different action to be taken (:action => ‘index’)
instead of ‘update’ action specified in the form_tag. And also pass the
selected announcement’s id to the ‘index’ action.

Please help me out.
Thanks in advance.
Regards,
Vasanth

what i want is to post this page to itself (controller name -

announcement) with different action to be taken (:action => ‘index’)
instead of ‘update’ action specified in the form_tag. And also pass
the
selected announcement’s id to the ‘index’ action.

http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.ht
ml#M000421

Roderick


Nedforce Informatica Specialisten B.V.
http://www.nedforce.nl
+31 (0)53 4500225

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs