GIF89a php
Current File : /home/hencockfreshchic/public_html/admin.cpanel/uploadjs/validateCoupons.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 = /^[A-Za-zƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0-9-]*$/;
   if (!regexp.test(theForm.ccode.value))
   {
      alert("Enter coupon code");
      theForm.ccode.focus();
      return false;
   }
   if (theForm.ccode.value == "")
   {
      alert("Enter coupon code");
      theForm.ccode.focus();
      return false;
   }
   if (theForm.ccode.value.length < 3)
   {
      alert("Enter coupon code");
      theForm.ccode.focus();
      return false;
   }
   if (theForm.ccode.value.length > 15)
   {
      alert("Enter coupon code");
      theForm.ccode.focus();
      return false;
   }
   var regexp;
   regexp = /^[-+]?\d*\.?\d*$/;
   if (!regexp.test(theForm.cvalue.value))
   {
      alert("Enter coupon value");
      theForm.cvalue.focus();
      return false;
   }
   if (theForm.cvalue.value == "")
   {
      alert("Enter coupon value");
      theForm.cvalue.focus();
      return false;
   }
   if (theForm.cvalue.value.length < 1)
   {
      alert("Enter coupon value");
      theForm.cvalue.focus();
      return false;
   }
   if (theForm.cvalue.value.length > 4)
   {
      alert("Enter coupon value");
      theForm.cvalue.focus();
      return false;
   }

   return true;
}