GIF89a
function deleteBlog(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("Blog has been deleted"); window.location.href = ("blogs.php"); } else if(this.responseText==0) { alert("Error : Unable to delete blog"); } } }; xmlhttp.open("GET","deleteBlog.php?sr="+sr,true); xmlhttp.send(); }