Choghadiya Today - Sunday, September 29, 2024 | Choghadiya for Burnaby, British Columbia, Canada | Aaj Ka Choghadiya, Today Shubh Kaal & Daily Muhurat (2024)

", function () { }); } } function isNumberKey1(evt) { var e = event || evt; var CharCode = e.which || e.keyCode; if (CharCode == 13) { $("#getOtp").click(); return false; } if (CharCode > 31 && (CharCode < 48 || CharCode > 57)) return false; } function IsMobileNoValid(MobNo) { var yValid = false; if (MobNo >= 6000000000 && MobNo <= 9999999999) { yValid = true; } return yValid; } //trackingUrl $("#getOtp").click(function () { var trackingUrl = ""; var frmMobileRegister = $('#MobileRegister'); $.validator.unobtrusive.parse(frmMobileRegister); frmMobileRegister.validate(); if (!frmMobileRegister.valid()) { //var btn = jQuery(this); //btn.prop('disabled', true); //setTimeout(function () { // btn.prop('disabled', false); //}, 3000); return false; } else { let customercountryCode = $("#MobCode").find(':selected').attr('data-country'); if ($("#MobCode").val() == '+91' && !IsMobileNoValid($("#ContactMobile").val())) { alertify.notify("

Please Enter A Valid Mobile Number

",'error', function () { }); return false; } else if ($("#captchaenabled").val() == 0 && isCaptchaAvailable > 0) { //$("#UserName").focus(); alertify.notify('

Please verify Captcha

', 'error', function () { }); return false; } var action = frmMobileRegister.attr("action"); /* var control = jQuery(this);*/ var ReturnUrl = getUrlParameter('ReturnUrl'); if (ReturnUrl != null && ReturnUrl != 'undefined') { if (ReturnUrl.length > 0) { let ParamsArray = ReturnUrl.split('?'); let Params = ParamsArray[1]; trackingUrl = Params; } } let userCounryCode = $("#MobCode").find(':selected').attr('data-country'); let referralCode = null; try { referralCode = new URLSearchParams(htmlDecode('?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT')).get('crefcode'); console.log('refcode', referralCode); } catch (e) { console.error(e); } //let captchaenabled = $("#captchaenabled").val(); var model = { ContactMobile: $("#ContactMobile").val(), MobCode: $("#MobCode").val(), trackingUrl: trackingUrl, ReferralCode: referralCode, reCaptchaResponse: captchaResponse, CountryCode: userCounryCode, captchaenabled: isCaptchaAvailable } $.ajax({ type: 'POST', url: action, dataType: "json", data: (model), beforeSend: function () { //Load icon will show onOtpBegin(); }, success: function (response) { onOtpSuccess(response); //jQuery(control).attr('disabled', false); }, complete: function (jqXhR, textStatus) { onOtpComplete(); }, error: function (xhr, status, error) { if (xhr.status == 422 || xhr.status == 429 || xhr.status == 500) { //do something about the error var errMsg = xhr.status + "\r\n" + status + "\r\n" + error; alertify.notify("

Please enter a valid mobile number or try with other login options.

","error", function () { }); } else { //do something about the error var errMsg = xhr.status + "\r\n" + status + "\r\n" + error; alertify.notify("

Unable to complete your request please try again

","error", function () { }); } } }); } });

", "error", function () { }); $('#loaderVerifyLogin').hide(); $('#btnVerify').show(); clearInterval(x); $("#btnResendOtp").attr("disabled", true); document.getElementById("divTimer").innerHTML = ""; }, requestTimeOut) } function ResetForm() { $("#btnResendOtp").attr("disabled", true); $('#btnVerify').show(); $('#loaderVerifyLogin').hide(); $("#Otp1").val(''); //$("#Otp2").val(''); //$("#Otp3").val(''); //$("#Otp4").val(''); //$("#Otp5").val(''); //$("#Otp6").val(''); StartTimer(); } function ResendOtp() { trackBtnClicks("Registration", "OTP_Screen", "ResendOTP_Requested", ""); let RegisterMobileUrl = 'https://www.anytimeastro.com/Account/RegisterMobile/'; $.post(RegisterMobileUrl, { UserId: $("#UserId").val(), MobCode: $("#MobCode").val() ,ContactMobile: $("#ContactMobile").val(), ResendOtp: true, OTPRequestId: $("#hfOTPRequestId").val() }, function (response) { if (response.UserId > 0) { $("#hfOTPRequestId").val(response.OtpRequestId); ResetForm(); alertify.notify("

OTP Sent Successfully

", "success", function () { }); } else { alertify.notify("

Please try again later

", "error", function () { }); } }) } function isNumberKey(evt,btnName) { var e = event || evt; var CharCode = e.which || e.keyCode; if (CharCode == 13) { $("#" + btnName).click(); return false; } if (CharCode > 31 && (CharCode < 48 || CharCode > 57)) return false; } function IsValid() { if ($("#Otp1").val() == "") { $("#Otp1").focus(); return false; } return true; } function onVerifyBegin() { if (IsValid()) { $('#btnVerify').hide(); $('#loaderVerifyLogin').show(); StartVerifyOtp(); return true; } else { $("#Otp1").focus(); alertify.notify("

Enter valid OTP

", "error", function () { }); return false; } } function onComplete() { clearTimeout(verifyOtp); sessionStorage.removeItem("SessionPlans"); } function getUrlVarsForOtp() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for (var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } function GetSessionClicked() { let ExpertProfileClicked = { "action": "", "experturl": "" }; var BeforePaymentSession = "BeforeLoginSession"; let BeforeLoginChatSession = sessionStorage.getItem(BeforePaymentSession); if (BeforeLoginChatSession != null && typeof BeforeLoginChatSession !== 'undefined') { traceLog("BeforeLoginSession", BeforeLoginChatSession); if (typeof BeforeLoginChatSession === 'string') { BeforeLoginChatSession = JSON.parse(BeforeLoginChatSession); } let BeforeLoginChatSessionType = sessionStorage.getItem("BeforeLoginSessionType"); if (typeof BeforeLoginChatSessionType !== 'undefined') { switch (BeforeLoginChatSessionType) { case "CHAT": ExpertProfileClicked.action = BeforeLoginChatSessionType; ExpertProfileClicked.experturl=BeforeLoginChatSession.ExpertUrl; break; case "CALL": ExpertProfileClicked.action = BeforeLoginChatSessionType; ExpertProfileClicked.experturl = BeforeLoginChatSession.ExpertUrl; break; case "MSG": ExpertProfileClicked.action = BeforeLoginChatSessionType; ExpertProfileClicked.experturl = BeforeLoginChatSession.ExpertUrl; break; } } } return ExpertProfileClicked; } function getBeforeLoginSessionPrefrence() { var ExpertSessionClicked = GetSessionClicked(); let redirectUrl = ""; if (ExpertSessionClicked != null && typeof ExpertSessionClicked === 'object') { if (ExpertSessionClicked.action != "" && ExpertSessionClicked.experturl != "") { if (ExpertSessionClicked.experturl.indexOf("http") >=0 && ExpertSessionClicked.experturl.indexOf("undefined") < 0) { redirectUrl = ExpertSessionClicked.experturl; } else if (ExpertSessionClicked.action.toLowerCase() == "chat") { redirectUrl = "https://www.anytimeastro.com/chat-with-astrologer/?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT"; } else if (ExpertSessionClicked.action.toLowerCase() == "call") { redirectUrl = "https://www.anytimeastro.com/talk-to-astrologer/?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT"; } } } return redirectUrl; } function showCustomerNameDobModal(customerinfo) { //console.log(customerinfo); $("#loginSignUp").modal("hide"); $("#customerName").val(customerinfo.DisplayName); if (customerinfo.DOB != "01/01/1900") { $("#customerDob").val(customerinfo.DOB); } $("#customerprofileinfo").modal("show"); } function redirectToPage(responseParams) { let redirectUrl = getBeforeLoginSessionPrefrence(); if (redirectUrl != "") { location.href = redirectUrl; } else { if (responseParams != "" && CheckIfDefaultParams(responseParams)) { let path = window.location.href.split('?')[0]; let allparams = window.location.href.split('?')[1]; if (allparams != null && allparams != "") { allparams = removeSpecificParameterFromAllParams(allparams, "utm_source"); allparams = removeSpecificParameterFromAllParams(allparams, "utm_campaign"); allparams = removeSpecificParameterFromAllParams(allparams, "utm_medium"); allparams = responseParams + "&" +allparams; location.href = path + allparams; } else { location.href = path + responseParams; } } else { var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); var uri = window.location.toString(); if (uri.indexOf("#") > 0) { url[0] = url[0].substring(0, url[0].length - 1) } if (url[0].indexOf("ReturnUrl") >= 0) globalIsClickOn = getUrlVarsForOtp()["ReturnUrl"]; if (globalIsClickOn == null || typeof globalIsClickOn === 'undefined') { if (typeof url[0] === 'string' && url[0].length > 3) { //location.href = url[0]; location.reload(); } else { location.href = "https://www.anytimeastro.com/?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT"; } } else if (globalIsClickOn == "chat") { location.href = "https://www.anytimeastro.com/chat-with-astrologer/?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT"; } else if (globalIsClickOn == "call") { location.href = "https://www.anytimeastro.com/talk-to-astrologer/?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT"; } else if (globalIsClickOn.indexOf("walletrecharge") > 0) { location.href = "https://www.anytimeastro.com/walletrecharge/?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT"; } else if (globalIsClickOn.indexOf("wallet") > 0) { let urlCurrentParams = decodeURIComponent(globalIsClickOn); location.href = "https://www.anytimeastro.com/{0}".format(urlCurrentParams); } else { location.reload(); } } } } function onVerifySuccess(response) { traceLog("onverifysuccess",response); clearTimeout(verifyOtp); debugger if (response.ecode == 200) { var IsFirstSignUp = response.IsSignUp; var isCustomerInfoRequired = false; if (IsFirstSignUp != undefined && IsFirstSignUp != null) { if (IsFirstSignUp == true) { isCustomerInfoRequired = true; if (IsCleverTapAllow) { cleverTapEvent("Sign Up", response.clevartap); } trackBtnClicks("Registration", "OTP_Screen", "OTP_SignUp_Done", ""); } else { if (response.DisplayName == "" || response.DOB == "" || response.DOB == "01/01/1900") { isCustomerInfoRequired = true; } if (IsCleverTapAllow) { cleverTapEvent("Login", response.clevartap); } } } $('#LoginVerifyOtp').html(null); $('#LoginVerifyOtp').html(response.ecode); console.log('returnUrl', returnUrl); if (returnUrl) { if (response != "" && response.Params != "" && CheckIfDefaultParams(response.Params)) { let allparams = returnUrl.split('?')[1]; if (allparams != null && allparams != "") { allparams = removeSpecificParameterFromAllParams(allparams, "utm_source"); allparams = removeSpecificParameterFromAllParams(allparams, "utm_campaign"); allparams = removeSpecificParameterFromAllParams(allparams, "utm_medium"); allparams = response.Params + "&" + allparams; window.location = returnUrl + allparams; } else { window.location = returnUrl + response.Params; } } else { window.location = returnUrl; } localStorage.removeItem('storedata'); localStorage.removeItem('cartdata'); return; } if (isCustomerInfoRequired) { /**Enable commented code if to show form*/ // showCustomerNameDobModal(response); redirectToPage(response.Params); } else { redirectToPage(response.Params); } } else { $('#btnVerify').show(); $('#loaderVerifyLogin').hide(); $("#Otp1").val(''); $("#Otp1").focus(); trackBtnClicks("Registration", "OTP_Screen", "OTP_Failed_Invalid", ""); if (response.ecode == 403) { alertify.notify("

Something went wrong. Please try again or contact support

", "error", function () { }); } else { alertify.notify("

Invalid OTP, Try Again

", "error", function () { }); } $("#btnResendOtp").attr("disabled", false); clearInterval(x); document.getElementById("divTimer").innerHTML = ""; } } $("#frmVerifyOtp").on("submit", function (e) { e.preventDefault(); var frmMobileRegister = $('#frmVerifyOtp'); $.validator.unobtrusive.parse(frmMobileRegister); frmMobileRegister.validate(); if (!frmMobileRegister.valid()) { return false; } else { var action = frmMobileRegister.attr("action"); /* var control = jQuery(this);*/ var model = { UserId: $("#UserId").val(), Otp1: $("#Otp1").val(), OTPRequestId: $("#hfOTPRequestId").val() } $.ajax({ type: 'POST', url: action, dataType: "json", data: (model), beforeSend: function () { //Load icon will show onVerifyBegin(); }, success: function (response) { onVerifySuccess(response); //jQuery(control).attr('disabled', false); }, complete: function (jqXhR, textStatus) { onComplete(); }, error: function (xhr, status, error) { //do something about the error var errMsg = xhr.status + "\r\n" + status + "\r\n" + error; alertify.notify("

Please try again later

", "error", function () { }); } }); } }) $(".otp-list input").keyup(function () { var key = event.keyCode || event.charCode; if (key === 8 || key === 37) { $(this).parent().prev().find(".otpbox").focus().select(); } else if (key == 48 || key == 49 || key == 50 || key == 51 || key == 52 || key == 53 || key == 54 || key == 55 || key == 56 || key == 57 || key == 96 || key == 97 || key == 98 || key == 99 || key == 100 || key == 101 || key == 102 || key == 103 || key == 104 || key == 105) { //console.log($(this).parent().html()); $(this).parent().next().find(".otpbox").focus().select(); } });

", function () { }); } } function isValidEmailFormat(email) { const regex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; return regex.test(email); } $("#getemailOtp").on("click", function(){ $("#EmailRegister").submit(); }); //trackingUrl $("#EmailRegister").on("submit", function (e) { e.preventDefault(); var trackingUrl = ""; var frmEmailRegister = $('#EmailRegister'); $.validator.unobtrusive.parse(frmEmailRegister); frmEmailRegister.validate(); if (!frmEmailRegister.valid()) { return false; } else { if (!isValidEmailFormat($("#UserEmail").val())) { alertify.notify('

Enter Valid Email

', 'error', function () { }); return false; } var action = frmEmailRegister.attr("action"); /* var control = jQuery(this);*/ var ReturnUrl = getUrlParameter('ReturnUrl'); if (ReturnUrl != null && ReturnUrl != 'undefined') { if (ReturnUrl.length > 0) { let ParamsArray = ReturnUrl.split('?'); let Params = ParamsArray[1]; trackingUrl = Params; } } let referralCode = null; try { referralCode = new URLSearchParams(htmlDecode('?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT')).get('crefcode'); console.log('refcode', referralCode); } catch (e) { console.error(e); } //let captchaenabled = $("#captchaenabled").val(); var model = { email: $("#UserEmail").val(), trackingUrl: trackingUrl, ReferralCode: referralCode, captchaenabled: isEmailCaptchaAvailable, reCaptchaResponse: captchaEmailResponse } $.ajax({ type: 'POST', url: action, dataType: "json", data: (model), beforeSend: function () { //Load icon will show onEmailOtpBegin(); }, success: function (response) { onEmailOtpSuccess(response); //jQuery(control).attr('disabled', false); }, complete: function (jqXhR, textStatus) { onEmailOtpComplete(); }, error: function (xhr, status, error) { if (xhr.status == 422 || xhr.status == 429 || xhr.status == 500) { //do something about the error var errMsg = xhr.status + "\r\n" + status + "\r\n" + error; alertify.notify("

Please enter a valid mobile number or try with other login options.

","error", function () { }); } else { //do something about the error var errMsg = xhr.status + "\r\n" + status + "\r\n" + error; alertify.notify("

Unable to complete your request please try again

","error", function () { }); } } }); } });

", "error", function () { }); $('#loaderEmailVerifyLogin').hide(); $('#btnEmailVerify').show(); clearInterval(xxs); $("#btnEmailResendOtp").attr("disabled", true); document.getElementById("divEmailTimer").innerHTML = ""; }, requestTimeOut) } function ResetEmailForm() { $("#btnEmailResendOtp").attr("disabled", true); $('#btnEmailVerify').show(); $('#loaderEmailVerifyLogin').hide(); $("#EmailOtp1").val(''); //$("#Otp2").val(''); //$("#Otp3").val(''); //$("#Otp4").val(''); //$("#Otp5").val(''); //$("#Otp6").val(''); StartEmailTimer(); } function ResendEmailOtp() { trackBtnClicks("Registration", "Email_OTP_Screen", "ResendOTP_Requested", ""); let RegisterEmailUrl = 'https://www.anytimeastro.com/Account/RegisterEmailOtp/'; $.post(RegisterEmailUrl, { UserId: $("#UserIdEmail").val(), email: $("#UserEmail").val(), ResendOtp: true, OTPRequestId: $("#hfEmailOTPRequestId").val() }, function (response) { if (response.UserId > 0) { $("#hfEmailOTPRequestId").val(response.OtpRequestId); ResetEmailForm(); alertify.notify("

OTP Sent Successfully

", "success", function () { }); } else { alertify.notify("

Please try again later

", "error", function () { }); } }) } //function isNumberKey(evt,btnname) { // var e = event || evt; // var CharCode = e.which || e.keyCode; // if (CharCode == 13) { // $("#" + btnname).click(); // return false; // } // if (CharCode > 31 && (CharCode < 48 || CharCode > 57)) // return false; //} function IsValidEmail() { if ($("#EmailOtp1").val() == "") { $("#EmailOtp1").focus(); return false; } return true; } function onVerifyBeginEmail() { if (IsValidEmail()) { $('#btnEmailVerify').hide(); $('#loaderEmailVerifyLogin').show(); StartVerifyEmailOtp(); return true; } else { $("#Otp").focus(); alertify.notify("

Enter valid OTP

", "error", function () { }); return false; } } function onCompleteEmail() { clearTimeout(verifyEmailOtp); sessionStorage.removeItem("SessionPlans"); } function getUrlVarsForOtp() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for (var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } function GetSessionClickedEmail() { let ExpertProfileClicked = { "action": "", "experturl": "" }; var BeforePaymentSession = "BeforeLoginSession"; let BeforeLoginChatSession = sessionStorage.getItem(BeforePaymentSession); if (BeforeLoginChatSession != null && typeof BeforeLoginChatSession !== 'undefined') { traceLog("BeforeLoginSession", BeforeLoginChatSession); if (typeof BeforeLoginChatSession === 'string') { BeforeLoginChatSession = JSON.parse(BeforeLoginChatSession); } let BeforeLoginChatSessionType = sessionStorage.getItem("BeforeLoginSessionType"); if (typeof BeforeLoginChatSessionType !== 'undefined') { switch (BeforeLoginChatSessionType) { case "CHAT": ExpertProfileClicked.action = BeforeLoginChatSessionType; ExpertProfileClicked.experturl=BeforeLoginChatSession.ExpertUrl; break; case "CALL": ExpertProfileClicked.action = BeforeLoginChatSessionType; ExpertProfileClicked.experturl = BeforeLoginChatSession.ExpertUrl; break; case "MSG": ExpertProfileClicked.action = BeforeLoginChatSessionType; ExpertProfileClicked.experturl = BeforeLoginChatSession.ExpertUrl; break; } } } return ExpertProfileClicked; } function getBeforeLoginSessionPrefrenceEmail() { var ExpertSessionClicked = GetSessionClickedEmail(); let redirectUrl = ""; if (ExpertSessionClicked != null && typeof ExpertSessionClicked === 'object') { if (ExpertSessionClicked.action != "" && ExpertSessionClicked.experturl != "") { if (ExpertSessionClicked.experturl.indexOf("http") >=0 && ExpertSessionClicked.experturl.indexOf("undefined") < 0) { redirectUrl = ExpertSessionClicked.experturl; } else if (ExpertSessionClicked.action.toLowerCase() == "chat") { redirectUrl = "https://www.anytimeastro.com/chat-with-astrologer/?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT"; } else if (ExpertSessionClicked.action.toLowerCase() == "call") { redirectUrl = "https://www.anytimeastro.com/talk-to-astrologer/?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT"; } } } return redirectUrl; } function showCustomerNameDobModalEmail(customerinfo) { //console.log(customerinfo); $("#loginSignUp").modal("hide"); $("#customerName").val(customerinfo.DisplayName); if (customerinfo.DOB != "01/01/1900") { $("#customerDob").val(customerinfo.DOB); } $("#customerprofileinfo").modal("show"); } function redirectToPageEmail(responseParams) { let redirectUrl = getBeforeLoginSessionPrefrenceEmail(); if (redirectUrl != "") { location.href = redirectUrl; } else { if (responseParams != "" && CheckIfDefaultParams(responseParams)) { let path = window.location.href.split('?')[0]; let allparams = window.location.href.split('?')[1]; if (allparams != null && allparams != "") { allparams = removeSpecificParameterFromAllParams(allparams, "utm_source"); allparams = removeSpecificParameterFromAllParams(allparams, "utm_campaign"); allparams = removeSpecificParameterFromAllParams(allparams, "utm_medium"); allparams = responseParams + "&" +allparams; location.href = path + allparams; } else { location.href = path + responseParams; } } else { var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); var uri = window.location.toString(); if (uri.indexOf("#") > 0) { url[0] = url[0].substring(0, url[0].length - 1) } if (url[0].indexOf("ReturnUrl") >= 0) globalIsClickOn = getUrlVarsForOtp()["ReturnUrl"]; if (globalIsClickOn == null || typeof globalIsClickOn === 'undefined') { if (typeof url[0] === 'string' && url[0].length > 3) { //location.href = url[0]; location.reload(); } else { location.href = "https://www.anytimeastro.com/?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT"; } } else if (globalIsClickOn == "chat") { location.href = "https://www.anytimeastro.com/chat-with-astrologer/?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT"; } else if (globalIsClickOn == "call") { location.href = "https://www.anytimeastro.com/talk-to-astrologer/?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT"; } else if (globalIsClickOn.indexOf("walletrecharge") > 0) { location.href = "https://www.anytimeastro.com/walletrecharge/?utm_source=astroweb&utm_campaign=site&utm_medium=AST5690_AST5561_RUNT"; } else if (globalIsClickOn.indexOf("wallet") > 0) { let urlCurrentParams = decodeURIComponent(globalIsClickOn); location.href = "https://www.anytimeastro.com/{0}".format(urlCurrentParams); } else { location.reload(); } } } } function onVerifySuccessEmail(response) { traceLog("onVerifySuccessEmail",response); clearTimeout(verifyEmailOtp); if (response.ecode == 200) { var IsFirstSignUp = response.IsSignUp; var isCustomerInfoRequired = false; if (IsFirstSignUp != undefined && IsFirstSignUp != null) { if (IsFirstSignUp == true) { isCustomerInfoRequired = true; if (IsCleverTapAllowEmail) { cleverTapEvent("Sign Up", response.clevartap); } trackBtnClicks("Registration", "Email_OTP_Screen", "OTP_SignUp_Done", ""); } else { if (response.DisplayName == "" || response.DOB == "" || response.DOB == "01/01/1900") { isCustomerInfoRequired = true; } if (IsCleverTapAllowEmail) { cleverTapEvent("Login", response.clevartap); } } } $('#LoginVerifyOtp').html(null); $('#LoginVerifyOtp').html(response.ecode); //var isSentfromPuja = localStorage.getItem('isSentfromPuja') ?? "false"; //if (isSentfromPuja == "true") { // localStorage.setItem('isSentfromPuja', "false"); // var PujaReturnPath = localStorage.getItem('PujaReturnPath'); // localStorage.setItem('PujaReturnPath', ""); // if (response != "" && response.Params != "" && CheckIfDefaultParams(response.Params)) { // let path = window.location.href.split('?')[0]; // let allparams = window.location.href.split('?')[1]; // if (allparams != null && allparams != "") { // allparams = removeSpecificParameterFromAllParams(allparams, "utm_source"); // allparams = removeSpecificParameterFromAllParams(allparams, "utm_campaign"); // allparams = removeSpecificParameterFromAllParams(allparams, "utm_medium"); // allparams = response.Params + "&" + allparams; // window.location = PujaReturnPath + allparams; // } else { // window.location = PujaReturnPath + response.Params; // } // } // else { // window.location = PujaReturnPath; // } // return; //} if (returnUrl) { if (response != "" && response.Params != "" && CheckIfDefaultParams(response.Params)) { let allparams = returnUrl.split('?')[1]; if (allparams != null && allparams != "") { allparams = removeSpecificParameterFromAllParams(allparams, "utm_source"); allparams = removeSpecificParameterFromAllParams(allparams, "utm_campaign"); allparams = removeSpecificParameterFromAllParams(allparams, "utm_medium"); allparams = response.Params + "&" + allparams; window.location = returnUrl + allparams; } else { window.location = returnUrl + response.Params; } } else { window.location = returnUrl; } localStorage.removeItem('storedata'); localStorage.removeItem('cartdata'); return; } if (isCustomerInfoRequired) { /**Enable commented code if to show form*/ // showCustomerNameDobModal(response); redirectToPageEmail(response.Params); } else { redirectToPageEmail(response.Params); } } else { $('#btnEmailVerify').show(); $('#loaderEmailVerifyLogin').hide(); $("#EmailOtp1").val(''); $("#EmailOtp1").focus(); trackBtnClicks("Registration", "Email_OTP_Screen", "OTP_Failed_Invalid", ""); if (response.ecode == 403) { alertify.notify("

Something went wrong. Please try again or contact support

", "error", function () { }); } else { alertify.notify("

Invalid OTP, Try Again

", "error", function () { }); } $("#btnEmailResendOtp").attr("disabled", false); clearInterval(xxs); document.getElementById("divEmailTimer").innerHTML = ""; } } $("#frmVerifyEmailOtp").on("submit", function (e) { e.preventDefault(); var frmEmailRegister = $('#frmVerifyEmailOtp'); $.validator.unobtrusive.parse(frmEmailRegister); frmEmailRegister.validate(); if (!frmEmailRegister.valid()) { return false; } else { var action = frmEmailRegister.attr("action"); /* var control = jQuery(this);*/ var model = { UserId: $("#UserIdEmail").val(), Otp1: $("#EmailOtp1").val(), OTPRequestId: $("#hfEmailOTPRequestId").val() } $.ajax({ type: 'POST', url: action, dataType: "json", data: (model), beforeSend: function () { //Load icon will show onVerifyBeginEmail(); }, success: function (response) { onVerifySuccessEmail(response); //jQuery(control).attr('disabled', false); }, complete: function (jqXhR, textStatus) { onCompleteEmail(); }, error: function (xhr, status, error) { //do something about the error var errMsg = xhr.status + "\r\n" + status + "\r\n" + error; alertify.notify("

Please try again later

", "error", function () { }); } }); } }) $(".otp-list-email input").keyup(function () { var key = event.keyCode || event.charCode; if (key === 8 || key === 37) { $(this).parent().prev().find(".otpbox-email").focus().select(); } else if (key == 48 || key == 49 || key == 50 || key == 51 || key == 52 || key == 53 || key == 54 || key == 55 || key == 56 || key == 57 || key == 96 || key == 97 || key == 98 || key == 99 || key == 100 || key == 101 || key == 102 || key == 103 || key == 104 || key == 105) { //console.log($(this).parent().html()); $(this).parent().next().find(".otpbox-email").focus().select(); } });

Choghadiya Today - Sunday, September 29, 2024 | Choghadiya for Burnaby, British Columbia, Canada | Aaj Ka Choghadiya, Today Shubh Kaal & Daily Muhurat (2024)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Ray Christiansen

Last Updated:

Views: 5923

Rating: 4.9 / 5 (69 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Ray Christiansen

Birthday: 1998-05-04

Address: Apt. 814 34339 Sauer Islands, Hirtheville, GA 02446-8771

Phone: +337636892828

Job: Lead Hospitality Designer

Hobby: Urban exploration, Tai chi, Lockpicking, Fashion, Gunsmithing, Pottery, Geocaching

Introduction: My name is Ray Christiansen, I am a fair, good, cute, gentle, vast, glamorous, excited person who loves writing and wants to share my knowledge and understanding with you.