No matter what I put in the fields FF always returns false. In other words I always get the alert box. Is there something different about coding for FF.
Thanks
JM
Here is the script:
<?xml version=”1.0″ encoding=”iso-8859-1″?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “
<html xmlns=”
<head>
<title>Validator</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<script type=”text/javascript”>
<!–
[B]function checkForm(form)
{
for (var i = 0; i < form.elements.length; i++)
{
if (form.elements[i].value == “”)
{
alert(“Fill out ALL fields.”);
return false;
}
}
return true;
}
//–>
</script>
</head>
<body>
[B]<form onsubmit=”return checkForm(this)” />
Please enter all requested information:<br />
First Name:<input type=”text” name=”firstName” /><br />
Last Name:<input type=”text” name=”lastName” /><br />
Rank:<input type=”text” name=”rank” /><br />
Serial Number:<input type=”text” name=”serialNumber” /><br />
<input type=”submit” />
</form>
</body>
</html>