GIF89a php
Current File : /home/hencockfreshchic/public_html/js/sendEnq2.js
function sendEnq2()
{
	var email=$("#email").val();
	var name=$("#name").val();
	var mobb=$("#mobb").val();
	var country=$("#country").val();
	var other_country=$("#other_country").val();

	if(email=="")
	{
		alert("Enter email id");
		$("#email").focus();
		return false;
	}
	if(name=="")
	{
		alert("Enter name");
		$("#name").focus();
		return false;
	}
	if(mobb=="")
	{
		alert("Enter mobile number");
		$("#mobb").focus();
		return false;
	}
	
	if(country=="")
	{
		if(other_country=="")
		{
		alert("Specify country.");
		$("#other_country").focus();
		return false;
		}
	}

	if(country=="Other Country")
	{
		if(other_country=="")
		{
		alert("Specify country.");
		$("#other_country").focus();
		return false;
		}
	}
	
	if (window.XMLHttpRequest) {
            xmlhttp = new XMLHttpRequest();
        } else {          
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        } 
  xmlhttp.onreadystatechange=function() 
   {
    if (this.readyState==4 && this.status==200) 
	{
      if(this.responseText==1)
      {
      	alert("Dear user, We got your precious whole sale request. Shortly will we be in touch with you. Please have a pateince with us...");
      	window.location.href = ("wholesale.php");
      }
      else if(this.responseText==0)
      {
      	alert("Dear user, We are unable to receive Wholesale request right now, Please try again later.");
      }	
	}
  };
  xmlhttp.open("GET","sendEnq2.php?email="+email+"&name="+name+"&mobb="+mobb+"&country="+country+"&other_country="+other_country,true);
  xmlhttp.send();

}