What is the easiest and most graceful way to auto-submit an AJAX form when a drop-down box\'s option is selected? I\'m creating an administration page where the admin can modify
In Rails 3:
<%= form_for(membership, :remote => true) do |f| %>` <%= f.select :permissions, [['none', 0], ['admin', 9]], {}, :onchange => 'this.form.submit();' %> <% end %>
Note that it's this.form.submit(); not onsubmit. And don't forget the Javascript semicolon.
this.form.submit();