GIF89a
function deleteEvent(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 event has been removed"); window.location.href = ("events.php"); } else { alert("Error : Unable to delete event. \n Contact to developers"); } } }; xmlhttp.open("GET","deleteEvent.php?sr="+sr,true); xmlhttp.send(); }