Hi,
I don't understand why this validation check isn't work,
Everything is OK, but ....
<html>
<head>
<script type="text/javascript">
function valForm()
{
var x = document.forms["ActorForm"]["actorfname"].value;
if (x == null || x == "")
{
alert("First name must be filled out");
return false;
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Actor insert form</title>
</head>
<body>
<form name="ActorForm" action="Actor_Insert.php" onSubmit="return valFrom()" method="post">
Person ID: <input type="text" name="actorid" /> Required<br />
<input type="radio" name="actorgender" value="male" /> Male<br />
<input type="radio" name="actorgender" value="female" /> Female<br />
First Name: <input type="text" name="actorfname" /><br />
Last Name: <input type="text" name="actorlname" /><br />
Birthday: <input type="date" name="actorbirthday" /><br />
<input type="submit" name="actorsubmit" value="Submit" />
</form>
</body>
</html>