faqts : Computers : Programming : Languages : JavaScript : Event handling

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

10 of 16 people (63%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

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

Dec 20th, 2001 19:14
Steve Smith, Shawn Bates, Philip Olson, http://www.dansteinman.com/dynduo/en/keystrokes.html


You will need to use the onKeyDown and/or onKeyPress Javascript events.
Visit http://www.dansteinman.com/dynduo/en/keystrokes.html for a decent 
explanation.
More than likely you will need to write a little function that 
determines when to actually submit the form. You'd do that with 
formname.sumbit()