I believe this only happens as you describe in IE, Firefox (and probably all other browsers) still submits the form when you hit 'enter'.
I'm sure there's a workaround for it, as long as it doesn't involve listening for keypress events when a form element has focus ;) -justin On 3/28/07, Michael Peters <[EMAIL PROTECTED]> wrote: > > This isn't really on topic for prototype (although solutions using prototype > are > welcome), but is more of an HTML/JS question about forms. > > If you have a form with an input of type 'submit', then while you're entering > info in that form and you press 'Enter', the form will submit. But if all you > have are inputs of type 'button' this doesn't happen. Is there any way to trap > that 'Enter' event (without having to try and trap key press events and fake > browser behaviour) or have it apply to a specific 'button' instead? > > Thanks. > > -- > Michael Peters > Developer > Plus Three, LP > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
