Self emptying Text Box
Want some initial text in a text box on a form, but want it to disappear as soon as the user clicks to enter data?
Click the box above to try it. Here’s how to do it.
In your code for the Input Box add :
Check Password Entry
Want to check if two passwords entered on a form are the same before sending the data?
Enter 2 different passwords in the boxes above and click submit to try it.
If you enter 2 identical passwords the form will be submitted (In this example back to this page.)
Here’s how to do it.
In your code for the 2nd Input Box add :
(where password1 is the name of the first input box and password the second)
eg:
<form action="" method="post" target="_self" enctype="application/x-www-form-urlencoded">
<input type="submit" name="submit" value="Submit" >
Password :<input type="password" name="password1" size="9" style="width:80px;" value="" >
Confirm Password :<input type="password" name="password" size="9" style="width:80px;" value="" onBlur="if ((this.value != this.form.password1.value)) alert('The passwords are not the same.');">
</form>