FormBox Password

[Total: 0    Average: 0/5]

This script will validate a text box form components value against a password.

Body Code:

<script>
/* this is the string to match */
var _string="validate";
var _showAlert=true; /* set to false to not have alert show up */

function valIt(_t)
{
  if(_showAlert && _t==_string) alert("Validated");
  return(_t==_string);
}
</script>
Word must be &quot;validate&quote; to be validated.
<form onsubmit="return valIt(this.form.t1.value)">
<input name=t1 value="validate">
<input type=button onclick="valIt(this.form.t1.value)" value="Validate Word">
</form>

Times Viewed: 7

Leave a Reply

Your email address will not be published. Required fields are marked *