Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Press enter submits form


  • From: javascript@xxxxxxxxxx (Harry Love)
  • Subject: [Javascript] Press enter submits form
  • Date: Mon, 26 Aug 2002 15:31:03 -0700

<snip>
Yes- that's the default behavior, but for a page with multiple forms and
submit buttons when enter is pressed I want to be able to simulate the
sumbit of a particular form.

David
</snip>

Sorry, I'm a visual learner.  From the above, here's what I'm picturing
in my mind (rough sketch):

<body>
<form1>
<some form elements>
<submit button>
</form>

<form2>
<some form elements>
<submit button>
</form>

<form3>
<some form elements>
<submit button>
</form>

</body>


Is that roughly what you have on your page?  If not, please send a URL.
If it is, and the user's mouse is inside one of the forms, I believe
only that form will submit when the [enter] key is pressed.

Harry