# Dropdown menu

**URL:** <https://www.ruby-forum.com/t/dropdown-menu/108082>\
**Category:** Rails\
**Created:** [June 28, 2007, 10:07pm UTC](https://www.ruby-forum.com/t/dropdown-menu/108082 "2007-06-28T22:07:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![james](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@james](https://www.ruby-forum.com/u/james)\
**Post date:** [June 28, 2007, 10:07pm UTC](https://www.ruby-forum.com/t/dropdown-menu/108082/1 "2007-06-28T22:07:45Z")

</div>

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!

thanks,

James
