GIF89a
function deleteData(sr,tbl){ 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) { window.location.reload(); } else if(this.responseText==0) { popUP("Unable to delete selected record"); } } }; xmlhttp.open("GET","deleteData.php?sr="+sr+"&tbl="+tbl,true); xmlhttp.send(); } function popUP(msgg) { var x = document.getElementById("snackbar"); $("#snack_msgg").html(msgg); x.className = "show"; setTimeout(function(){ x.className = x.className.replace("show", "Hello"); }, 2500); }