faqts : Computers : Programming : Languages : PHP : Common Problems : Forms and User Input

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

10 of 13 people (77%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How I can check if the form was submitted if it only has one field and a submit button, and the user hit "enter" instead of clicking on the button?

Jun 14th, 2004 02:32
Sigrid Broecker-Smidt, Mark, Dominik Rabiej,


there is no way to. this is a current limitation of html. You will note 
that the submit button is not needed for the enter key to execute a 
form...
perhaps you should address your desire to have a distinction with the 
W3C. http://www.w3c.org Try joining one of their mailing lists.
-mark
Try <form ... method="GET">
The submit button is not set. This works with IE6.0 / IIS 5.0 and maybe 
elsewhere.
-sigrid