Forum Moderators: open
just a simple script to check if a couple form fields are empty
<script>
function Check()
{
z = document.PersonalChange;
if ((z.EmployeeName.value == "") ¦¦ (z.PayrollNumber.value == ""));
{
alert('You need to enter your name');
return false;
}
else
{
alert('woohoo');
return true;
}
}
</script>
--for the form I have....
<form method=post action="success.html" name="PersonalChange" onSubmit="return Check();">
but i get an error before I get a chance to execute the form