GIF89a
function updateOrderStatus(){ var newStatus=$("#newStatus").val(); var sr=$("#sr").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","updateOrderStatus.php?newStatus="+newStatus+"&sr="+sr,true); xmlhttp.send(); }