GIF89a
function updateSizeVariants(srr){ var size_name=$("#size_name").val(); var size_unit=$("#size_unit").val(); if(size_name=="") { alert("Enter name of new size, Given name of size will show during product listing page"); $("#size_name").focus(); return false; } if(size_unit=="") { alert("Enter size measurement unit, Given measurement will show on website so please fill it carefully, otherwise UI on website may be impact"); $("#size_unit").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("Size variant has been updated successfully"); window.location.href = ("size_variants.php"); } else if(this.responseText==0) { alert("Dear user, We are unable to update new size variant now, please contact to developers to resolve this issue"); } } }; xmlhttp.open("GET","updateSizeVariants.php?size_name="+size_name+"&size_unit="+size_unit+"&sr="+srr,true); xmlhttp.send(); }