# How to get the current value of a select box?

**URL:** <https://www.ruby-forum.com/t/how-to-get-the-current-value-of-a-select-box/92863>\
**Category:** Rails\
**Created:** [April 25, 2007, 7:14am UTC](https://www.ruby-forum.com/t/how-to-get-the-current-value-of-a-select-box/92863 "2007-04-25T07:14:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c2a13f/32.png) [@Leo](https://www.ruby-forum.com/u/Leo)\
**Post date:** [April 25, 2007, 7:14am UTC](https://www.ruby-forum.com/t/how-to-get-the-current-value-of-a-select-box/92863/1 "2007-04-25T07:14:36Z")

</div>

Here is my code:

 \<%= observe\_field 'search\_form', :frequency =\> 0.5, :update =\> 'results', :url =\> { :controller =\> 'programs', :action=\> 'get\_results', :search\_type =\> select\_type }, # an error occurs :with =\> "'search\_text=' + escape(value)"%\> \<%= select "select","type",{"BOY" =\> '1', "Girl" =\> '2'}%\>

Can anyone tell me how to pass the value of the select box when i call  
“get\_results”?
