You are here: irt.org | FAQ | JavaScript | Form | 7.1 | Q27 [ previous next ]
This is achieved with the following code:
<script language="JavaScript"><!-- function submit1() { document.passwordForm.passwordField.focus(); return false; } function submit2() { document.passwordForm.useridField.value = document.useridForm.useridField.value; /* perform any validation here */ return true; } //--></script> <form name="useridForm" onSubmit="return submit1()"> <p>Userid: <input name="useridField" type="text"> </form> <form name="passwordForm" onSubmit="return submit2()"> <input name="useridField" type="hidden"> <p>Password: <input name="passwordField" type="password"> </form>