Forum: Ruby on Rails dropdown menu

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
72a449d6bfff83e068da087266289bb4?d=identicon&s=25 James (Guest)
on 2007-06-28 22:07
(Received via mailing list)
Hi everyone,

I've been trying to figure out this problem for a good while but can't
seem to do it on my own.  I need to create a dropdown menu that when
the user changes the value it will trigger a remote_function.  The
dropdown menu is populated for now by an array of words that I defined
in the controller called @frame_color[].  Here's what I have so far...

<%= select_tag(:color, options_for_select(@frame_color,
params[:color]), :onchange => remote_function(:update =>
"middle_sub_right", :url => {:action => 'print_change', :passed_color
=> params[:color], :id => @prints, :photo => @photo}))%>

All I need is for the selected value in the dropdown menu is passed
to :passed_color when the remote_function is triggered but i'm not
sure where or how to get this value.

Any help would be greatly appreciated!


This topic is locked and can not be replied to.