Calling a remote method on choosing an item from Select


#1

Hi,

Is there a way where in I can trigger remote action when an user choose
one of the options in the dropdown of “select” method?

Mebbe something like on_change but instead of triggering JS action,
remote action is what i am looking at.

Please suggest

Regards,
Sandeep


#2

On 19 Jan 2009, at 15:23, Sandeep G. wrote:

Please suggest

onchange is what you want. the javascript in there should make an ajax
request.

Fred


#3

Thanks Fred.
I used something like this:
{:onchange => ‘window.location=this.value;’}
the value of the select option can be made text link. So it worked like
a charm for me to load a new page on selecting an option.