You are here: irt.org | FAQ | JavaScript | Bugs | Q1065 [ previous next ]
Symptom: Pressing enter in a form with single input field does not submit the form if there is any other input field on the page even in a different form.
Workaround: None that I know of.
The following was submitted by Robert de Bruin
Symptom: Pressing enter in a form with single input field does not submit the form if there is any other input field on the page even in a different form.
Workaround: try adding a <INPUT TYPE="image"> tag within the form. Although this may not make sense, it works on my forms
<FORM ACTION="test.php" METHOD="post" NAME="login"> <INPUT TYPE="text" NAME="username" VALUE=""> <INPUT TYPE="password" NAME="password" VALUE=""> <A HREF="javascript:document.login.submit()">log in</A> <INPUT TYPE="image" SRC="./images/blank.gif"> </FORM>