GIF89a
function deleteDeal(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("Selected deal has been removed"); window.location.href = ("hot_deals.php"); } else if(this.responseText==0) { alert("Sorry !! Unable to remove the deal | Please contact to developer"); } } }; xmlhttp.open("GET","deleteDeal.php?sr="+sr,true); xmlhttp.send(); }