GIF89a php
Current File : /home/hencockfreshchic/public_html/admin.cpanel/uploadjs/UpdateSEO.js
function UpdateSEO(op){
   var cat= $("#cat").val();
   var subcat=$("#subcat").val();
   var prod=$("#prod").val();
   var ops=$("#ops").val();
   var tags=$("#tags").val();
   var tag_sr=$("#tag_sr").val();


var regexp;
   regexp = /^[A-Za-zƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ#]*$/;
   if (!regexp.test(tags))
   {
      alert("Invalid tag");
      $("#tags").focus();
      return false;
   }
   if (tags == "")
   {
      alert("Tag is empty");
      $("#tags").focus();
      return false;
   }
   if (tags.length < 3)
   {
      alert("Minimum tag words are 3");
      $("#tags").focus();
      return false;
   }
   if (tags.length > 20)
   {
      alert("Tag ax words limit exceed");
      $("#tags").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("Tag has been updated");
               if(op==1){
               window.location.href = ("seoform.php");
             }
             else{
              window.location.href = ("linkSeo.php");
             }
            }
            else
            {
              alert("Unable to update tags");
                 if(op==1){
               window.location.href = ("seoform.php");
             }
             else{
              window.location.href = ("linkSeo.php");
             }
            }
         }
       };
       xmlhttp.open("GET","updateSEO.php?catt="+btoa(cat)+"&subcat="+btoa(subcat)+"&tags="+tags+"&sr="+tag_sr+"&prod="+prod+"&ops="+ops+"&tags="+tags,true);
       xmlhttp.send();

}