Created
May 17, 2011 04:57
-
-
Save buddye/975977 to your computer and use it in GitHub Desktop.
Rails 3 Select form helper for onchange javascript event
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= f.select :offer_type, { "Custom" => "offer", "Discount" => "discount", "Video" => "video" }, {}, :onchange => 'alert(this.options[this.selectedIndex].value);' %> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for posting this. Incredible how difficult it is to find a clean, simple example like this from which to build upon.