Rev 2117 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
function showPaymentModeSelectionBox(){var originalAddressId = $('form[name="frmProceedToPay"] :input[name="addressid"]').val();$('form[name="paymentModeSelection"] :input[name="addressid"]').val(originalAddressId);$.fn.colorbox({inline:true, href:".payModeLightBoxColor", open:true, width:"500px", onComplete:function(){var posLeft = (document.documentElement.clientWidth / 2) - (parseInt($('#colorbox').css('width')) / 2);var posTop = (document.documentElement.clientHeight / 2) - (parseInt($('#colorbox').css('height')) / 2);$('#colorbox').css('top', posTop);$('#colorbox').css('left', posLeft);}});trackEventWithGA('Order', 'Proceed to Pay', "");trackPageWithGA("/proceed-to-pay");}function verifyPaymentModeSelectionForm(){var selected = '';var payment_option = 0;var typeInputs = $("form[name='paymentModeSelection'] :input[name='type']");for(var i=0; i<typeInputs.length; i++)if(typeInputs[i].checked)selected = typeInputs[i].value;if(selected == ''){dispError("Please select a payment method.");return false;}payment_option = $("form[name='paymentModeSelection'] select[name='g"+ selected + "']").val();if(payment_option > 0){$("form[name='paymentModeSelection'] :input[name='payment_option']").val(payment_option);return true;}elsedispError("Please select a payment method.");return false;}function dispError(error){alert(error);}