if you are on a form that has more than one submit buttons the submit event wont fire when pressing enter with a focused input (noticed it on firefox, not sure if its equals in all browsers).
-- Fábio Miranda Costa Solucione Sistemas Front-End Engineer http://meiocodigo.com On Mon, Jul 27, 2009 at 11:08 AM, Ryan Florence <[email protected]>wrote: > > > I usually don't use the submit event but the click > > event > > That is bad usability. What happens when I hit "enter" inside of a > text field? > > > Ryan Florence > http://ryanflorence.com/blog > > > > On Jul 27, 2009, at 3:41 AM, daKmoR wrote: > > > > > does anyone actually read links that get posted? > > > > if you have a form I usually don't use the submit event but the click > > event for the button or submit input... > > with that I can easily check what button got hit... > > > > it's as simple as that: > > $$('input[type=submit]').addEvent('click', function(e) { > > e.stop(); > > myRequest.send( $('myForm').toQueryString() + '&' + this.name + '=' > > + this.value ); > > }); > > > > >
