GIF89a
function approveHotDeal(sr){ 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("Hot deal has been approved and inform to vendor"); window.location.href = ("approve_deal.php"); } else if(this.responseText==0) { alert("Error : Unable to update product \n Contact to developers"); } } }; xmlhttp.open("GET","approveHotDeal.php?sr="+sr,true); xmlhttp.send(); }