Hello, I'm having troulbe validating a form. I found this script on a website, but it doesn't seem to be working.
<!-- start html & script -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="JavaScript">
function validate() {
1 = document.form.1.value;
if ((1 == "")) {
alert("Please enter your name or your email address.");
return false;
}
else return true;
}
</script>
</head>
<body>
<form action="index.html" method="post" name="form" onSubmit="return validate()">
<input type='text' name='1' value="" onFocus="document.form.1.value='';"><br>
<input type='submit' value='tst'>
</form>
</body>
</html>
<!-- end html & script -->
Any help would be greatly appretiated & thanx in advance!
<!-- start html & script -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="JavaScript">
function validate() {
1 = document.form.1.value;
if ((1 == "")) {
alert("Please enter your name or your email address.");
return false;
}
else return true;
}
</script>
</head>
<body>
<form action="index.html" method="post" name="form" onSubmit="return validate()">
<input type='text' name='1' value="" onFocus="document.form.1.value='';"><br>
<input type='submit' value='tst'>
</form>
</body>
</html>
<!-- end html & script -->
Any help would be greatly appretiated & thanx in advance!