You are here: irt.org | FAQ | JavaScript | Form | 7.1 | Q682 [ previous next ]
Try:
<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>