[thelist] Forms with single text inputs and HTML spec - Help?

ben morrison morrison.ben at gmail.com
Wed Mar 25 18:33:51 CDT 2009

On Wed, Mar 25, 2009 at 9:41 PM, Jay Turley <jayturley at gmail.com> wrote:

> Hi all-
> The HTML spec (
> http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2 ) says:
> When there is only one single-line text input field in a form, the
> user agent should accept Enter in that field as a request to submit
> the form.
> I'm trying to do an AJAX form submission  of a form with "only one
> single-line text input field" and no matter what I do, when I hit the
> ENTER button in major browsers, the form is submitted as a GET request
> with a query string.

Are you using any libraries?

You need to look at e.preventDefault() or e.stopEvent() on the form itself.


Ben Morrison

More information about the thelist mailing list