Topic: Validation/return false ?????

hi i am newbie in javascript
and i am trying to do validation with javascripts
in this code why we are using
  return false; statement......what is the purpose to use that statement
pls help.....................



<script language="javascript"
  type="text/javascript">

<!-- hide script from older browsers
function validateForm(contact)
{

if(""==document.forms.contact.fullName.value)
{
alert("Please enter your full name.");
return false;
}

if(""==document.forms.contact.email.value)
{
alert("Please enter your email address.");
return false;
}

if(""==document.forms.contact.phoneNum.value)
{
alert("Please enter your phone number.");
return false;
}

}
stop hiding script -->
</script>


IN HTML FILE.....

<form name="contact" method="post" action=""
  onSubmit="return validateForm(contact);">

Re: Validation/return false ?????

I suppose the point of the "return false;" statement is to say that the form is not valid because of an empty field. The if statements look like they are supposed to check if each of the fields are equal to nil. An if statement will be entered only if the field is empty; you will see an alert, and the computer will see that the form is invalid, since the form function returned "false."