GIF89a
function approveVendorProd(prod_sr, user_id,prod_name){ 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("Product has been approved | Now product is live on website"); window.location.href = ("approve_vendor_prod.php"); } else { alert("Failed !! , we can process, server side issue"); window.location.href = ("approve_vendor_prod.php"); } } }; xmlhttp.open("GET","approveVendorProd.php?prod_sr="+prod_sr+"&user_id="+user_id+"&prod_name="+prod_name,true); xmlhttp.send(); }