Tasmanian Devil
05-07-2003, 03:45 PM
how do I get the syntax error to work out?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<form action="" onsubmit="if (this.first.value == this.second.value && /^\S{4}\S*$/.test(this.first.value)) {this.submit(); if (top.opener) top.close()} else {alert('Both \'Password\' fields must be the same, contain no spaces and be four or more characters in length.'); this.first.value=''; this.second.value=''}; return false">
<p><label>Password<br>
<input type="password" name="first"></label></p>
<p><label>Password<br>
<input type="password" name="second"></label></p>
<div><input type="submit"></div>
</form>
Thanks
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<form action="" onsubmit="if (this.first.value == this.second.value && /^\S{4}\S*$/.test(this.first.value)) {this.submit(); if (top.opener) top.close()} else {alert('Both \'Password\' fields must be the same, contain no spaces and be four or more characters in length.'); this.first.value=''; this.second.value=''}; return false">
<p><label>Password<br>
<input type="password" name="first"></label></p>
<p><label>Password<br>
<input type="password" name="second"></label></p>
<div><input type="submit"></div>
</form>
Thanks