Here''s one that I use:
<%= select(:order, :customer_id, @customers, {:include_blank => true},
{ :onchange => remote_function(:url => {:action => :get_address},
:complete => "eval(request.responseText)", :with =>
"''customer_id=''+
escape(value)")}) %>
This triggers the get_address action and passes the value from the selection
box as a GET parameter.
On 4/30/06, John <john.henderson@mac.com> wrote:>
> Is there any way to trigger a controller action when the user picks an
> option from a selection list?
>
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060430/e4b514d8/attachment.html