GIF89a php
Current File : /home/hencockfreshchic/public_html/admin.cpanel/uploadjs/validateVoucher.js
function ValidateForm1(theForm)
{
   var cat=$("#cat").val();
   var subcat=$("#subcat").val();
   var prod=$("#prod").val();

if(cat==""){
    alert("Select category");
      $("#cat").focus();
      return false;
}
if(subcat==""){
    alert("Select sub category");
      $("#subcat").focus();
      return false;
}

if(prod==""){
    alert("Select product type");
      $("#prod").focus();
      return false;
}


   var regexp;
    regexp = /^[0-9-]*$/;
   if (!regexp.test(theForm.discount.value))
   {
      alert("Enter coupon code");
      theForm.discount.focus();
      return false;
   }
   if (theForm.discount.value == "")
   {
      alert("Enter coupon code");
      theForm.discount.focus();
      return false;
   }
   if (theForm.discount.value.length < 1)
   {
      alert("Enter coupon code");
      theForm.discount.focus();
      return false;
   }
   if (theForm.discount.value.length > 3)
   {
      alert("Enter coupon code");
      theForm.discount.focus();
      return false;
   }
   return true;
}