|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Is it possible to cause a multi-field form to be submitted when the user
hits the enter key no matter which field on the form the cursor is in, if the form has more than 2 fields? Found so far: <SCRIPT LANGUAGE="JavaScript"><!-- function submit1() { document.useridForm.passwordField.value = document.passwordForm.passwordField.value; } function submit2() { document.passwordForm.useridField.value = document.useridForm.useridField.value; } //--></SCRIPT> <FORM NAME="useridForm" onSubmit="submit1()"> <P>Userid: <INPUT NAME="useridField" TYPE="TEXT"> <INPUT NAME="passwordField" TYPE="HIDDEN"> <SCRIPT LANGUAGE="JavaScript"><!-- document.write('</FORM><FORM NAME="passwordForm" onSubmit="submit2()">') //--></SCRIPT> <INPUT NAME="useridField" TYPE="HIDDEN"> <P>Password: <INPUT NAME="passwordField" TYPE="PASSWORD"> <P><INPUT TYPE="SUBMIT"> </FORM> |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Submit form with multiple fields |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|