Forum: Ruby on Rails Specifying Javascript events for form fields

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Will B. (Guest)
on 2006-01-16 21:17
(Received via mailing list)
So forgive the stupid question, I'm a relative Rails newby.  I have a
that I would like to submit each time the user changes their selection
one of several select items (single selection only).

I've got this behavior working properly in the select_tag method, but I
have two other fields on the form - a month and a year.  The month and
tags are created using the select_month and select_year methods,
respectively.  I tried specifying an :onChange => 'submit()' option for
year and month methods, but it doesn't appear to do anything, even
though it
works with the select_tag methods.

Is there a way to do this?  I'd hate to have to throw out the Rails tag
creation helpers in order to write the raw HTML for the tags myself.

Any help would be greatly appreciated!

This topic is locked and can not be replied to.