GIF89a
function selectPay(amount,order_id,user_name,mobb,email) { var radio1=""; if ($("#radio1").prop("checked")) { radio1=$('#radio1:checked').val(); } if ($("#radio2").prop("checked")) { radio1=$('#radio2:checked').val(); } if(radio1=="") { alert(radio1); popUP("Select Payment Method"); return false; } 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) { if(radio1=="COD") { window.location.href = ("success.php?orderid="+order_id+"&name="+user_name+"&email="+email+"&price="+amount+"&type=1"); } else if(radio1=="Prepaid") { window.location.href = ("pay.php?amount="+amount+"&order_id="+order_id+"&user_name="+user_name+"&mobb="+mobb+"&email="+email); } } else if(this.responseText==2) { window.location.href = ("dashboard.php"); } else if(this.responseText==3) { popUP("No item found in cart"); } else { window.location.reload(); } } }; if(radio1=="COD") { xmlhttp.open("GET","cod.php?order_id="+order_id,true); } else if(radio1=="Prepaid") { xmlhttp.open("GET","prepaid.php?order_id="+order_id,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); }