[Dojo-interest] Overriding form submission even when using the Enter key

Andreas Hartmann andreas at apache.org
Thu Apr 23 10:03:58 EDT 2009

Hi everyone,

I have bound a JavaScript function to the submit button of a form, 
causing the form to be submitted via an xhrPost request. However, when 
the user hits "Enter" in Safari, the form is submitted the usual way. 
Firefox doesn't submit the form at all when Enter is pressed.

Is there any way to prevent Safari from submitting the form when the 
Enter key is pressed? Can I somehow bind my JavaScript function to the 
enter key instead?

Thanks a lot in advance!


Andreas Hartmann, CTO
BeCompany GmbH
Tel.: +41 (0) 43 818 57 01

More information about the Dojo-interest mailing list