'); $.ajax({ type: "GET", url: url, data: {orderNumber: orderNumber, zipCode: zipCode}, success: function (result) { $(".ajaxLoading-bg, .ajaxLoading-img").remove(); if (result.length > 0) { if (result[0].name == 'Success') { $('#checkOrderStatusForm').attr('action', ACC.config.contextPath + '/guest/getOrderStatus'); $('#checkOrderStatusForm').submit(); } if (result[0].name == 'Failure') { $('#checkOrderStatusMessage').after('' + result[0].value + ''); } } }, error: function (result) { $('#checkOrderStatusMessage').after('' + result[0].value + ''); } }); } else { event.preventDefault(); } }); }); function validateSignInForm() { // added this line of code for lazy loading $('body').prepend('
'); var favouriteURL = $('#favourite_link').val(); var vURL = ACC.config.contextPath + "/login/headerlogin"; $ .ajax({ type: 'POST', url: vURL, data: $("#signInForm").serialize(), success: function (result) { //First, remove the spinner $(".ajaxLoading-bg, .ajaxLoading-img").remove(); [] var nameStr = result[0].name; var valueStr = result[0].value; var pardotSignInUrl = result[1].value; if (nameStr == "Success") { if (favouriteURL != '') { $.post(favouriteURL, function (result) { window.location.href = window.location.href; }); } else { window.location.href = window.location.href.replace(window.location.hash, ""); } var emailStr = "emailAddress=" + $('#j_username').val(); doPardotSignIn(emailStr, pardotSignInUrl); } else if (nameStr == "SuccesswithCartMerge") { showCartMerge(window.location.href); } else if (nameStr == "/cart/checkout") { window.location.href = ACC.config.contextPath + nameStr; } else if (nameStr == "/cart/checkoutwithCartMerge") { showCartMerge("/cart/checkout"); } else if (nameStr == "/checkout/single/quotesummary") { window.location.href = nameStr; } else if (nameStr == "/checkout/single/quotesummarywithCartMerge") { showCartMerge("/checkout/single/quotesummary"); } else if (nameStr == "redirect:/welcome") { window.location.href = "/welcome"; } else if (nameStr == "maxpasswordCount") { $('#j_username').next('span').remove(); $('#j_username').after('Having trouble logging in? Use the forgot your password link below to recover your login details.'); } else if (nameStr == "email not found") { $('#j_username').next('span').remove(); $('#j_username').after('Entered email address or password is wrong'); } else if (nameStr == "Bad Password") { $('#j_username').next('span').remove(); $('#j_username').after('Entered email address or password is wrong'); } else if (nameStr == "modal") { $('#check_availability_modal').html(valueStr) $('#check_availability_modal').modal(); } else { $('#j_username').next('span').remove(); $('#j_username').after('Entered email address or password is wrong'); } } }); } function doPardotSignIn(emailStr, pardotSignInUrl) { $.ajax({ type: "POST", url: pardotSignInUrl, data: emailStr, success: function (data) { }, error: function (data) { //Do Nothing; } }); } function showCartMerge(data) { $("#accountSignIn").hide(); $('.ajaxLoading-bg').hide(); $('.ajaxLoading-img').hide(); $("#cartMergedSuccess").modal(); $("#mergedMsg").html("Recovered cart items from your last sign-in have been added to your current cart."); $('#popupClose').click(function () { $('.ajaxLoading-bg').show(); $('.ajaxLoading-img').show(); window.location.href = data; }); $('#cartMergeCloseIcon').click(function () { $('.ajaxLoading-bg').show(); $('.ajaxLoading-img').show(); window.location.href = ACC.config.contextPath + data; }); } $(document).ready(function () { $('a[href="' + ACC.config.contextPath + '/guest/checkOrderStatus"]').click(function (event) { event.preventDefault(); $('#check_order_status_modal').modal(); }); // added method for removing vslidation onBlur $.validate({ form: '#forgottenPwdForm', validateOnBlur: false, showHelpOnFocus: false, addSuggestions: true }); $("#forgottenPwdForm").submit(function (event) { event.preventDefault(); validateForgotpswdForm(); }); //This will show alert popups if (''.length > 0) { // if(true) { $.ajax({ type: "GET", url: "/alert", data: {title: "Important Message", message: ""}, // parameters sync: true, success: function (result) { if (result.length > 0) { $('#alert_modal').html(result) $('#alert_modal').modal(); } else { //Do Nothing } }, error: function (result) { alert("error! " + result); } }); } }); //added the method to avoid the conflict between checkout sign in and header sign in on cart page. function clearRedirectValue() { $(".form-redirect").attr("value", "") $("input[id$='demo-field']").each(function () { if ($(this).attr('type').eq("password")) { $(this).css('display', 'block') $(this).val(""); } if ($(this).attr('type').eq("text")) { $(this).css('display', 'none') $(this).val(""); } }); $('[id^="showpasscheckbox"]').attr('checked', false); } // TODO function validateForgotpswdForm() { var vusername = document.getElementById("email").value; var resetMsg = $('#resetMsg').val(); var resetMultiSiteMsg = $('#resetMsgMultiSite').val(); var vURL = ACC.config.contextPath + "/login/pw/request"; $ .ajax({ type: 'post', url: vURL, data: $("#forgottenPwdForm").serialize(), success: function (data) { if (data == "Success") { $("#accountPasswordReset").hide(); $("#accountPasswordResetSuccess").modal(); $(".msg").html(resetMsg + " " + vusername + ""); } if (data == "Failure") { $('#email').next('span').remove(); $('#email') .after( 'Entered email address was not found'); } if (data == "SuccessMultiSite") { $("#accountPasswordReset").hide(); $("#accountPasswordResetSuccess").modal(); $(".msg").html(resetMsg + " " + vusername + "" + "

" + resetMultiSiteMsg); } }, error: function (jqXHR, exception) { $(".msg").html("Entered email address or password is wrong"); } }); } function validatePassword() { $("#checkPasswordValidOrNot").addClass("help-block form-error"); $("#checkPasswordValidOrNot").hide(); } function validateEmail() { $("#forgotEmailMsg").addClass("help-block form-error"); $("#forgotEmailMsg").hide(); } $('.modal').on('hidden.bs.modal', function () { /* $(this).find('form')[0].reset(); */ $('#checkPasswordValidOrNot').hide(); }); $('#PasswordReset').on('click', function (event) { var signupEmail = $("#j_username").val(); $('#email').val(signupEmail); }); $('#j_username').on('focusout', function () { var text = $.trim($(this).val()); this.value = ""; this.value = text; }); function registrationSalesForceSubmit() { var industryforsalesforce = ''; var industryforsalesforcearray = industryforsalesforce.split(','); var industry = ''; if (industry == 'Aerospace & Defense') { industry = industryforsalesforcearray[1]; } if (industry == 'Research & Education') { industry = industryforsalesforcearray[0]; } if (industry == 'Life & Health Science') { industry = industryforsalesforce[3]; } if (industry == 'Microelectronics') { industry = industryforsalesforcearray[2]; } if (industry == 'Industrial Manufacturing') { industry = industryforsalesforcearray[4]; } // modified for sales force value var residential = ''; if (residential == 'false') { residential = 'No'; } else { residential = 'Yes'; } var reseller = ''; if (reseller == 'false') { reseller = 'No'; } else { reseller = 'Yes'; } var state = ''; if (state != '') { var statearray = state.split("-"); state = statearray[1]; } var country = ''; if (country == 'US' || country == 'CA') { } else { state = ""; } var title = ''; if (title != '') { var myTitle = title; title = myTitle.substring(0, 1).toUpperCase() + myTitle.substring(1); } var usersalutation = ''; var userfirstname = ''; var userlastname = ''; var useremail = ''; var userphone = ''; var userurl = ''; var userstate = ''; var userstreet = ''; var usercity = ''; var usercompany = ''; var userzip = ''; var usercountry = ''; var userprimarymarket = ''; var userdescription = ''; var userleadsource = ''; var useroid = ''; var usercurrency = ''; var userbusinessunit = ''; var userjobtitle = ''; var userrecordtype = ''; var userregion = ''; var userbusinessgroup = ''; $ .ajax({ type: "POST", url: '', data: usersalutation + '=' + title + '&' + userfirstname + '=' + '' + '&' + useremail + '=' + '' + '&' + userphone + '=' + '' + '&' + userlastname + '=' + '' + '&' + userurl + '=' + '' + '&' + userstate + '=' + state + '&' + userstreet + '=' + '' + '&' + usercity + '=' + '' + '&' + usercompany + '=' + '' + '&' + userzip + '=' + '' + '&' + usercountry + '=' + '' + '&' + userprimarymarket + '=' + encodeURIComponent(industry) + '&' + userdescription + '=' + encodeURIComponent('Lead was generated through web registration form. Customer provided account number: ' + '' + '\n' + 'isResedential: ' + residential + '\n' + 'isReseller: ' + reseller) + '&' + userleadsource + '=' + '' + '&' + useroid + '=' + '' + '&' + usercurrency + '=' + '' + '&' + userbusinessunit + '=' + '' + '&' + userbusinessgroup + '=' + '' + '&' + userjobtitle + '=' + '' + '&' + userrecordtype + '=' + '' + '&' + userregion + '=' + '' }); }
Butt Weld Tee