Specifying Javascript events for form fields

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs