faqts : Computers : Programming : Languages : JavaScript : Forms

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

26 of 69 people (38%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How do I get the Submit Button to submit the form using Netscape when the Enter key is struck?

Oct 24th, 2000 16:29
Tim Powell, Shawn Bates,


A form will submit in Netscape when pressing the Enter key as long as 
it only has one text field (input type=text or textarea). It may be 
possible to restructure your form to support this. 
Using the onKeyPress event in Netscape 4+ it's also possible to trap 
for the Enter key (key 13).