GIF89a php
Current File : /home/hencockfreshchic/public_html/admin.cpanel/js/linkSeo.js
function linkSeo(){

	var cat=$("#cat").val();
	var subcat=$("#subcat").val();
  var prod=$("#prod").val();
  var ops=$("#ops").val();
	var keyword=$("#keyword").val();

	if(cat==""){
		alert("Choose Category , where you want to apply keyword");
		$("#cat").focus();
		return false;
	}
	if(subcat==""){
		alert("Choose Sub Category , where you want to apply keyword");
		$("#subcat").focus();
		return false;
	}
	if(keyword==""){
		alert("Choose Keyword , which you want to apply keyword");
		$("#keyword").focus();
		return false;
	}
  if(prod==""){
    alert("Choose product, on which you wanna apply seo");
    $("#prod").focus();
    return false;
  }

if(ops==""){
    alert("Choose option for seo for , on which you want to apply keyword");
    $("#ops").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("SEO new keyword has been linked successfully");
      	window.location.href = ("linkSeo.php");
      }
      else if(this.responseText==0)
      {
      	alert("System unable to link your keyword, Contact to developer");
      }
      else if(this.responseText==2)
      {
      	alert("Selected Keyword is already exist");
      	window.location.href = ("linkSeo.php");
      }
	}
  };
  //alert("linkSeoKeyword.php?cat="+cat+"&subcat="+subcat+"&keyword="+keyword);
  xmlhttp.open("GET",encodeURI("linkSeoKeyword.php?cat="+cat+"&subcat="+subcat+"&keyword="+keyword+"&prod="+prod+"&ops="+ops),true);
  xmlhttp.send();
}