' + ' ' + ' ' + ' '); } var mobile = ""; var data = JSON.stringify({ campaignId: campaignId, clickId: clickId, affiliate_id: affiliate_id, msisdn: iemobilenumber }); loadWaitMSG(); $.ajax({ type: "Post", contentType: "application/json; charset=utf-8", dataType: "json", data: data, url: "Default.aspx/getTrafficSource", success: function (data) { hideWaitMSG(); var result = JSON.parse(data.d); $(location).attr('href', result["urlSend"]); } }); } if ($("#HiddenField_Operator").val() == "41") { var clickId = getQueryVariable("clickId"); var campaignId = getQueryVariable("campaignId"); var affiliate_id = "not_available"; if (getQueryVariable("offer_id")) { affiliate_id = getQueryVariable("offer_id"); } var mobile = $(".mobilenumber").val(); if (mobile.indexOf(" ") != -1) { mobile = mobile.replace(/ /g, ''); } if (mobile.indexOf("+") != -1) { mobile = mobile.replace("+", ""); } var url = "http://clients.actelme.com/consentgateway/UAE/DU/Timwe/?id_application=4257&imageUrl=http://ps.funforall.me/sohati/sohati.png&msisdn=" + mobile + "&correlatorId=" + campaignId + "SEPAR" + clickId + "SEPAR" + affiliate_id + "&buyChannel=WEB"; $(location).attr('href', url); } else { try { hideWaitMSG(); var result = jQuery.parseJSON(data.d); if (result.Result.toString().indexOf("Error") == "-1") { $("#HiddenField_mobile").val(result.Result.toString()); $(".bodyrow").hide(); $(".pincoderow").show(); } else { hideWaitMSG(); $("#errorspan").html(result.Error.toString()); $('#popup').show(); $('#popup').bPopup({ easing: 'easeOutBack', speed: 450, transition: 'slideDown', opacity: 0.6, positionStyle: 'fixed' }); } } catch (rt) { alert(rt); } } } }); } } catch (rt) { alert(rt); } } function continueClickFunction() { if ($(".pincodetxt").val() == "") { $("#errorspan").html("Please Enter Pincode"); $('#popup').show(); $('#popup').bPopup({ easing: 'easeOutBack', speed: 450, transition: 'slideDown', opacity: 0.6, positionStyle: 'fixed' }); } else { __DO_PIXEl('verifypin'); loadWaitMSG(); var data = JSON.stringify({ langid: $("#langid").val(), operatorid: $("#HiddenField_Operator").val(), msisdn: $("#HiddenField_mobile").val(), pincode: $(".pincodetxt").val(), kp: $("#kp").val(), ctr: $("#ctr").val(), network_key: $("#network_key").val(), clickId: $("#clickId").val(), campaignId: $("#campaignId").val(), affiliate_id: $("#affiliate_id").val() }); $.ajax({ type: "Post", contentType: "application/json; charset=utf-8", dataType: "json", data: data, url: "Default.aspx/VerifyPincode", error: function (jqXHR, textStatus, errorThrown) { hideWaitMSG(); $("#errorspan").html(errorThrown); $('#popup').show(); $('#popup').bPopup({ easing: 'easeOutBack', speed: 450, transition: 'slideDown', opacity: 0.6, positionStyle: 'fixed' }); }, success: function (data) { var result = jQuery.parseJSON(data.d); if (result.Error.toString() == "-1") { var operatorId = $("#HiddenField_Operator").val(); if (operatorId == "18") { window.location = result.Result; } else { hideWaitMSG(); window.location = "http://ps.funforall.me/Common/globalThanks.aspx?id_application=4257&msisdn=" + $("#HiddenField_mobile").val() + "&ctr=" + getQueryVariable("ctr") + "&lng=" + getQueryVariable("lng"); //$(".thanksrowdiv").html(result.Result.toString()); //$(".pincoderow").hide(); //$(".thanksrow").show(); } } else { hideWaitMSG(); $("#errorspan").html(result.Result.toString()); $('#popup').show(); $('#popup').bPopup({ easing: 'easeOutBack', speed: 450, transition: 'slideDown', opacity: 0.6, positionStyle: 'fixed' }); } } }); } } $(".sub").click(function () { subClickFunction(); }); $(".continue").click(function () { continueClickFunction(); }); $(".iemobilenumber").keyup(function (event) { if (event.keyCode == 13) { subClickFunction(); } }); $(".pincodetxt").keyup(function (event) { if (event.keyCode == 13) { continueClickFunction(); } }); });