# RJS and Rails

**URL:** <https://discuss.rubyonrails.org/t/rjs-and-rails/14360>\
**Category:** rubyonrails-talk\
**Created:** [June 13, 2007, 3:46pm UTC](https://discuss.rubyonrails.org/t/rjs-and-rails/14360 "2007-06-13T15:46:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duplex](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@Duplex](https://discuss.rubyonrails.org/u/Duplex)\
**Post date:** [June 13, 2007, 3:46pm UTC](https://discuss.rubyonrails.org/t/rjs-and-rails/14360/1 "2007-06-13T15:46:08Z")

</div>

Well i guess you use the wrong helper here. Remote-function doesn't automacigally take the value of the selected option and sends it in params i think. You took the code from the Rails API docs i assume. Your controller code might be helpful too

You should try observe\_field:

\<select id="client\_gender" name="client[gender]"\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<option value=""\>- Select -\</option\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<option value="Male"\>Male\</option\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<option value="Female"\>Female\</option\> \</select\> \<% = observe\_field "cliend\_gender", {:url =\> {:action =\> change}, :on =\> "changed"}

This should take the "value" of the \<select\> tag and pass it in the params hash
