enter just processes the submit button. if you disable the submit button, then enter key press will be disabled as well. personally, i would get rid of the submit tag and use a image_submit_tag to get rid of stupid keyboard annoyances. This will force the user to click on the link to submit and you can do things like asking for confirmation or disabling it once pressed.
On Aug 27, 2:20 am, Jim Burgess <rails-mailing-l...@andreas-s.net> wrote: > Lee Smith wrote: > > They could have also hit the 'enter' key multiple times too, not > > clicking anything. > > > But in either case, a small amount of javascript will prevent this. > > To prevent the submit button being pressed many times I am using > <%= submit_tag "Submit", :onclick => "this.disabled = true" %> > as kindly suggested by Aldric. > > How would I stop users pressing enter multiple times with java script. > JS is really not my forte so i would be grateful for any advice > -- > Posted viahttp://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---