GIF89a
function changeQty(msg,qty,prod_id,field,tbl,redirect) { var txt; var data = prompt(msg,qty); if (data == null || data == "") { } else { 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 data has been updated successfully"); window.location.href = (redirect); } else if(this.responseText==0) { alert("Unable to change selected data"); } } }; xmlhttp.open("GET","changeQty.php?data="+data+"&field="+field+"&prod_id="+prod_id+"&tbl="+tbl,true); xmlhttp.send(); } }