# calling controller method on selecting drop down box

**URL:** <https://discuss.rubyonrails.org/t/calling-controller-method-on-selecting-drop-down-box/28992>\
**Category:** rubyonrails-talk\
**Created:** [May 6, 2008, 6:56am UTC](https://discuss.rubyonrails.org/t/calling-controller-method-on-selecting-drop-down-box/28992 "2008-05-06T06:56:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [May 6, 2008, 6:56am UTC](https://discuss.rubyonrails.org/t/calling-controller-method-on-selecting-drop-down-box/28992/1 "2008-05-06T06:56:02Z")

</div>

hi all,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i want to call a method in a controller by selecting a option in drop down box.can i do it without using javascript.is there any onSelect like option which can call a method in controller.now im using select\_tag option for that drop down box.im new to ror.guys please help me.

---

<div class="post-metadata">

**Author:** ![alberto2](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@alberto2](https://discuss.rubyonrails.org/u/alberto2)\
**Post date:** [May 6, 2008, 1:04pm UTC](https://discuss.rubyonrails.org/t/calling-controller-method-on-selecting-drop-down-box/28992/2 "2008-05-06T13:04:05Z")

</div>

Javascript is ideal for trapping the browser events and when combined with rails, it works quite nicely.

You do not want to use Javascript because of limitations on your client browser? or because you do not want to write Javascript yourself?

If the latter, with rails, there are helpers that allow you to do this easily withing your rails code.

[http://groups.google.com/group/rubyonrails-talk/browse\_thread/thread/d8f6e5914bbfbb39](http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/d8f6e5914bbfbb39)
