Thursday, August 7, 2008

CHECK BOX Validations

function checkForm()
{
   errorMessage = false
   errorText = " "
   if (document.forms[0].Zip_Postalcode.value == "")
   {
      errorMessage = true
      errorText+="Zip Code n"
   }
   if (errorMessage ==true)
   {
      alert("Please make sure to fill out all required fields. Go back and check: " +  errorText +  "n" ")
      self.location="testjs2.php"
      return false
   }
      if (errorMessage==false)
      {return true}
}

No comments: