Back to Scripts page
Click in the text area below, select all and copy to grab the script
Script listing:
<HTML> <HEAD> <TITLE>Password Check</TITLE> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- Hide script from older browsers function validForm(passForm) { if (passForm.passwd1.value == "") { alert("You must enter a password") passForm.passwd1.focus() return false } if (passForm.passwd1.value != passForm.passwd2.value) { alert("Entered passwords did not match") passForm.passwd1.focus() passForm.passwd1.select() return false } return true } // End hiding script --> </SCRIPT> </HEAD> <BODY BGCOLOR=WHITE> <FORM onSubmit="return validForm(this)" ACTION="someAction.cgi"> Your name: <INPUT TYPE=TEXT SIZE=30> <P>Choose a password: <INPUT TYPE=PASSWORD NAME="passwd1"> <P>Verify password: <INPUT TYPE=PASSWORD NAME="passwd2"> <P><INPUT TYPE=SUBMIT VALUE="Submit"> <INPUT TYPE=RESET> </FORM> </BODY> </HTML>