GIF89a
function saveOrderStatus(){ var prod_id=$("#prod_id").val(); var newStatus=$("#newStatus").val(); var psr=$("#psr").val(); if(prod_id=="") { alert("Invalid product name"); $("#prod_id").focus(); return false; } if(newStatus=="") { alert("Invalid status | Enter status"); $("#newStatus").focus(); return false; } 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("Product status has been updated"); window.location.href = ("m_o_t.php"); } else if(this.responseText==0) { alert("Error: Unable to update product status | Contact to developer"); } } }; xmlhttp.open("GET","saveOrderStatus.php?prod_id="+prod_id+"&newStatus="+newStatus+"&psr="+psr,true); xmlhttp.send(); }