CINXE.COM
IEEE Spectrum Subscription Form
<!DOCTYPE html> <!-- redirect this page if an attribute 'redirectForm' is found --> <html> <head> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <link rel="shortcut icon" type="image/ico" href="/ieee/images/ieee-favicon.ico" /> <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css"/> <link rel="stylesheet" type="text/css" media="screen" href="/ieee/css/bootstrap-multiselect.css"/> <link rel="stylesheet" type="text/css" href="/ieee/css/form-messages.css" type="text/css"> <link rel="stylesheet" type="text/css" media="screen" href="/ieee/css/omeda.css"> <link rel="stylesheet" type="text/css" media="screen" href="/ieee/css/responsive-form.css"> <link rel="stylesheet" type="text/css" media="screen" href="/ieee/css/r-client.css"> <link rel="stylesheet" type="text/css" media="screen" href="/ieee/css/r-brand.css"> <title>IEEE Spectrum Subscription Form</title> <script src="https://code.jquery.com/jquery-1.9.1.js" integrity="sha256-e9gNBsAcA0DBuRWbm0oZfbiCyhjLrI6bmqAl5o+ZjUA=" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script> <script> if (!String.prototype.startsWith) { String.prototype.startsWith = function(searchString, position){ position = position || 0; return this.substr(position, searchString.length) === searchString; }; } </script> <script src="/ieee/js/bootstrap-multiselect.js"></script> <script> $(document).ready(function(){ $("#legacyLoginSubmit").validate({ "rules": { }, submitHandler: function(form) { var sbut = $("input[type=submit]", form); sbut.attr('disabled', 'disabled'); form.submit(); } }); <!-- as of 10/26/18 this file is being included on pages that do NOT use JSTL --> <!-- do not allow @ sign --> $.validator.addMethod('excludeChar', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || !(/[@]/.test(value)); },"That is not a valid entry."); <!-- do not allow @ sign french--> $.validator.addMethod('excludeCharFr', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || !(/[@]/.test(value)); },"Ceci n'est pas une entr茅e valide."); <!--allows 1234567890, A-Z, a-z, !@#$%^&*()_+-=,.<>/?;':"[]{}\|`~ OR nothing --> $.validator.addMethod('allStandardChars', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /[ -~\~]+$/.test(value); },"Only english characters allowed."); <!--allows 1234567890, A-Z, a-z, !@#$%^&*()_+-=,.<>/?;':"[]{}\|`~ --> $.validator.addMethod('allStandardCharsFr', function (value, element) { return /[ -~\~]+$/.test(value); },"Seuls les caract猫res anglais sont autoris茅s."); <!--allows 1234567890, A-Z, a-z, !@#$%^&*()_+-=,.<>/?;':"[]{}\|`~ OR nothing --> $.validator.addMethod('allStandardCharsOptional', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /[ -~\~]+$/.test(value); },"Only english characters allowed."); <!--allows 1234567890, A-Z, a-z, !@#$%^&*()_+-=,.<>/?;':"[]{}\|`~ OR nothing --> $.validator.addMethod('allStandardCharsOptionalFr', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /[ -~\~]+$/.test(value); },"Seuls les caract猫res anglais sont autoris茅s."); <!--allows 12345-1234, 123456789, 12345, a1a 1a1, a1a1a1 --> $.validator.addMethod('usPostalCode', function (value) { return /^((\d{5}-?\d{4})|(\d{5}))$/.test(value); },"Please enter a valid US postal code."); <!--allows a1a 1a1, a1a1a1 --> $.validator.addMethod('canadaPostalCode', function (value) { return /^([a-zA-Z]\d[a-zA-Z]\s?\d[a-zA-Z]\d)$/.test(value); },"Please enter a valid Canadian postal code."); <!--allows 12345-1234, 123456789,12345, a1a 1a1, a1a1a1 --> $.validator.addMethod('postalCode', function (value) { return /^((\d{5}-?\d{4})|(\d{5})|([a-zA-Z]\d[a-zA-Z]\s?\d[a-zA-Z]\d))$/.test(value); },"Please enter a valid US or Canadian postal code."); <!--(123)123-1234 or (123) 123-1234 or 123-123-1234 or 123.123.1234, etc--> $.validator.addMethod('phone', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^(\(([0-9]{3})\)[-. ]?([0-9]{3})[-. ]?([0-9]{4})|([0-9]{3})[-. ]?([0-9]{3})[-. ]?([0-9]{4}))$/.test(value); },"Please enter a valid phone number."); <!--allows numbers, spaces, ., (, ), -, + --> $.validator.addMethod('genericPhone', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[\d\s\.\(\)\-\+]{0,}(?=\d{3,})[\d\s\.\(\)\-\+]{0,}$/.test(value); },"Please enter a valid phone number."); <!--allows numbers, spaces, ., (, ), -, + --> $.validator.addMethod('genericPhoneFr', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[\d\s\.\(\)\-\+]{0,}(?=\d{3,})[\d\s\.\(\)\-\+]{0,}$/.test(value); },"s'il vous pla卯t entrer un num茅ro de t茅l茅phone valide."); <!--allows numbers, spaces, ., (, ), -, + --> $.validator.addMethod('genericFax', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[\d\s\.\(\)\-\+]{0,}(?=\d{3,})[\d\s\.\(\)\-\+]{0,}$/.test(value); },"Please enter a valid fax number."); <!--(123)123-1234 or (123) 123-1234 or 123-123-1234 or 1231231234, etc--> $.validator.addMethod('phoneCustom', function (value) { return /^\(?([0-9]{3})\)?[- ]?([0-9]{3})[- ]?([0-9]{4})$/.test(value); },"Please enter a valid phone number."); <!--(123)123-1234 or (123) 123-1234 or 123-123-1234 or 1231231234, etc--> $.validator.addMethod('faxCustom', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^\(?([0-9]{3})\)?[- ]?([0-9]{3})[- ]?([0-9]{4})$/.test(value); },"Please enter a valid fax number."); <!--allows numbers, spaces, (, ), -, + --> $.validator.addMethod('genericPhoneCustom', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[\d\s\(\)\-\+]{10,}$/.test(value); },"Please enter a valid phone number."); <!--allows international phone number --> $.validator.addMethod('internationalPhoneCustom', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^\+(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\d{1,14}$/.test(value); },"Please enter a valid international phone number."); <!--allows number only --> $.validator.addMethod('phoneDigits', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[0-9]+$/.test(value); },"Please enter a valid international phone number."); <!--allows upper/lower case alph, spaces, . and - --> $.validator.addMethod('alpha', function (value) { return /^[-\.\sa-zA-Z]+$/.test(value); },"That is not a valid entry."); <!--allows upper/lower case alph, spaces, . and - --> $.validator.addMethod('alphaFr', function (value) { return /^[-\.\sa-zA-Z]+$/.test(value); },"Ceci n'est pas une entr茅e valide."); <!--minimum length of 2 --> $.validator.addMethod('minLength', function (value) { return /^.{2,}$/.test(value); },"That is not a valid entry."); <!--minimum length of 2 french--> $.validator.addMethod('minLengthFr', function (value) { return /^.{2,}$/.test(value); },"Ceci n'est pas une entr茅e valide."); <!--allows upper/lower case alph, spaces, ., - and ' --> $.validator.addMethod('alphaApostrophe', function (value) { return /^[-\.\sa-zA-Z']+$/.test(value); },"That is not a valid entry."); <!--allows upper/lower case alph, spaces, ., - and ' --> $.validator.addMethod('alphaApostropheFr', function (value) { return /^[-\.\sa-zA-Z'茅脿芒盲猫茅锚毛卯茂么霉没眉每莽]+$/i.test(value); },"Ceci n'est pas une entr茅e valide."); <!--allows upper/lower case alph, spaces, ., - and ' --> $.validator.addMethod('alphaApostropheOptional', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[-\.\sa-zA-Z']+$/.test(value); },"That is not a valid entry."); <!--allows upper/lower case alph, spaces, ., - and ' --> $.validator.addMethod('alphaApostropheOptionalFr', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[-\.\sa-zA-Z']+$/.test(value); },"Ceci n'est pas une entr茅e valide."); <!--allows upper/lower case alph, and spaces--> $.validator.addMethod('alphaOptional', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[a-zA-Z\s]+$/.test(value); },"That is not a valid entry."); <!--allows upper/lower case alph, and spaces--> $.validator.addMethod('alphaOptionalFr', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[a-zA-Z\s]+$/.test(value); },"Ceci n'est pas une entr茅e valide."); <!--allows upper/lower case alph, numbers, spaces, . and - --> $.validator.addMethod('alphaNumeric', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[-\.\sa-zA-Z\d]+$/.test(value); },"That is not a valid entry."); <!--allows upper/lower case alph, numbers, spaces, . and - --> $.validator.addMethod('alphaNumericFr', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[-\.\sa-zA-Z\d]+$/.test(value); },"Ceci n'est pas une entr茅e valide."); <!--allows upper/lower case alph, numbers, and spaces ONLY --> $.validator.addMethod('alphaNumericSpaceOnly', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[\sa-zA-Z\d]+$/.test(value); },"That is not a valid entry."); <!--allows upper/lower case alph, numbers, and spaces ONLY --> $.validator.addMethod('alphaNumericSpaceOnlyFr', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[\sa-zA-Z\d]+$/.test(value); },"Ceci n'est pas une entr茅e valide."); <!--when this class is added to a field the error message is will show --> $.validator.addMethod('province', function (value) { return false; },"Invalid Canadian province/postal code combination."); <!--when this class is added to a field the error message is will show --> $.validator.addMethod('provinceFr', function (value) { return false; },"Entr茅e invalide pour province canadienne/code postal."); <!--when this class is added to a field the error message is will show --> $.validator.addMethod('country', function (value) { return false; },"Invalid State/Country combination."); <!--when this class is added to a field the error message is will show --> $.validator.addMethod('countryFr', function (value) { return false; },"Entr茅e invalide pour province/pays."); <!--when this class is added to a field the error message will show --> $.validator.addMethod('print-usa-only', function (value) { return false; },"Free print subscription is only available for US addresses. <br/>Please select the 'Digital Version'."); <!-- Compare label with blank and default (parameter) value --> $.validator.addMethod('requiredDefault', function(value, element, param) { return value && value != param; },'Please enter a value.'); <!-- Compare label with blank and default (parameter) value --> $.validator.addMethod('requiredFr', function(value) { return value && value != ''; },'Ce champ est requis.'); <!--if the country is not = USA, an error message will be shown --> $.validator.addMethod('usaOnly', function (value) { return false; },"A Paid subscription is required for addresses outside of the US."); <!--validate address to have at least 1 alphanumeric character before allowing ., --> $.validator.addMethod("addressValidate", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || value == value.match(/^[a-zA-Z0-9]{1}[a-zA-Z0-9 .,]*$/); },"Please enter a valid address."); <!--validate username to have only certain characters --> $.validator.addMethod("username", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[a-zA-Z0-9!$'\-\.@_~]+$/.test(value); },"Usernames may only contain letters, numbers, and !$'-.@_~"); <!-- if we ever decide we need to prevent leading 0s update to ^[1-9]+\d+$ --> $.validator.addMethod('postId', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || (value.match(/^\d+$/) && parseInt(value) != 0); },"Please enter valid account number."); $.validator.addMethod("needsSelection", function(value, element) { var count = $(element).find('option:selected').length; return count > 0; },"Please select at least one option."); $.validator.addMethod("email", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || /^(([a-zA-Z0-9_.'-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z]){2,})?$/.test(value); },"Please enter a valid email address."); $.validator.addMethod("emailFr", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || /^(([a-zA-Z0-9_.'-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z]){2,})?$/.test(value); },"Veuillez saisir une adresse de courriel valide."); $.validator.addMethod("studentEmail", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || /(.edu){1}$/.test(value); },"Please enter a valid .edu email address"); $.validator.addMethod("studentEmailExtended", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || /(.edu){1}$/.test(value) || /(.ac){1}$/.test(value)|| /(.uk){1}$/.test(value); },"Please enter a valid .edu .ac .uk email address"); $.validator.addMethod("validDomains", function(value, element) { return (this.optional(element) && $(element).val().length === 0) ; },"Please enter company email address."); $.validator.addMethod("confirmEmail", function(value, element) { return (value).toLowerCase() === ($("#Emails_GROUP1_EmailAddress").val()).toLowerCase(); },"Please enter the same email as above."); $.validator.addMethod("confirmUsernameAsEmail", function(value, element) { return (value).toLowerCase() === ($("#Username").val()).toLowerCase(); },"Please enter the same email as above."); $.validator.addMethod("confirmEmailFr", function(value, element) { return (value).toLowerCase() === ($("#Emails_GROUP1_EmailAddress").val()).toLowerCase(); },"Entrez le m锚me email que ci-dessus."); $.validator.addMethod("confirmUsernameAsEmailFr", function(value, element) { return (value).toLowerCase() === ($("#Username").val()).toLowerCase(); },"Entrez le m锚me email que ci-dessus."); $.validator.addMethod("confirmPassword", function(value, element) { return value === $("input#password").val(); },"Please enter the same password as above."); $.validator.addMethod("confirmPasswordFr", function(value, element) { return value === $("input#password").val(); },"Entrez le m锚me mot de passe que ci-dessus."); <!-- validate password as described in error message --> $.validator.addMethod("auth-password", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[0-9a-zA-Z]{1,}(.*)$/.test(value); },"Please enter at least 6 characters, and include a minimum of 1 lower-case letter(s), 1 upper case letter(s) and 1 number(s)"); <!-- validate password as described in error message --> $.validator.addMethod("auth-passwordFr", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[0-9a-zA-Z]{1,}(.*)$/.test(value); },"Veuillez saisir au moins 6 caract猫res et inclure au moins une lettre minuscule, une lettre majuscule et un chiffre."); <!-- validate password as described in error message --> $.validator.addMethod("limit-password", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[\.\sa-zA-Z\d~!@#$%^&*()_\-+=?.]+$/.test(value); },"Please enter only alphanumeric characters or ~!@#$%^&*()_-+=?.<>"); <!-- validate password as described in error message --> $.validator.addMethod("limit-passwordFr", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || /^[\.\sa-zA-Z\d~!@#$%^&*()_\-+=?.]+$/.test(value); },"Veuillez saisir seulement des caract猫res alphanum茅riques ou sp茅ciaux ~!@#$%^&*()_-+=?.<>"); <!-- validate optional password field --> $.validator.addMethod("optionalPassword", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || btoa($(element).val())=== ""; },"Invalid Password"); <!-- basic validation for prices (should be valid integer or double) --> $.validator.addMethod("price", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || /^\d{0,8}(\.\d{1,4})?$/.test(value);<!-- the price is right! --> },"Please enter a valid amount"); <!-- require at least 2 names be provided (separated by a space) - generally for NameOnCard --> $.validator.addMethod("first-last-required", function(value, element) { return (this.optional(element) && $(element).val().length === 0) || value.match(/\S+/g).length>1; },"Enter a first and last name"); <!-- validate price code radio against country --> $.validator.addMethod("ppc-radio-input", function(value, element) { var selectedCountry = $("[name^=Addresses_][name$=_CountryCode]").not(":disabled").val(); var selectedGeoLocation = $(".ppc-radio-input:checked").attr("data-ppc-geolocation"); var valid = true; if((selectedCountry && selectedCountry.length > 0) && (selectedGeoLocation && selectedGeoLocation.length > 0)){ if((selectedGeoLocation === "1" && selectedCountry !== "USA") || (selectedGeoLocation === "2" && selectedCountry !== "CAN") || (selectedGeoLocation === "3" && selectedCountry === "USA") || (selectedGeoLocation === "4" && selectedCountry !== "MEX")){ valid = false; } } return valid; },"The country you selected is not valid for the selected payment option."); <!-- validate price code radio against country for gift page--> $.validator.addMethod("ppc-radio-input-gift", function(value, element) { var selectedCountry = $("[name^=Addresses_][name$=_CountryCode]").not(":disabled").val(); var selectedGeoLocation = $(".ppc-radio-input-gift:checked").attr("data-ppc-geolocation"); var valid = true; if((selectedCountry && selectedCountry.length > 0) && (selectedGeoLocation && selectedGeoLocation.length > 0)){ if((selectedGeoLocation === "1" && selectedCountry !== "USA") || (selectedGeoLocation === "2" && selectedCountry !== "CAN") || (selectedGeoLocation === "3" && selectedCountry === "USA") || (selectedGeoLocation === "4" && selectedCountry !== "MEX")){ valid = false; } } return valid; },"The country you selected is not valid for the selected payment option."); <!-- email is required for certain payment options, validate it here --> $.validator.addMethod("ppc-email-required", function(value, element) { var valid = true; if($(".ppc-radio-input:checked").hasClass("ppc-email-required")){ //if there are gift recipient emails, loop through all of them to determine whether any have been left empty var giftRecipientEmails = $("input[name^=recipient][name$=_EmailAddress]").not(":disabled"); if($(giftRecipientEmails).length > 0){ $.each(giftRecipientEmails, function(index,element){ if($(element).val() === ""){ valid = false; } }); } else{ valid = $("input[name=Emails_GROUP1_EmailAddress]").val().length > 0; } } return valid; },"Email address is required for the selected payment option."); <!-- validate passalong product, at least one should be checked --> $.validator.addMethod("passalongProduct", function(value, element) { var valid = false; var passalongClass = findPassalongClassForElement($(element)); var isEmpty = true; //only need to select a passalong product if any of the passalong group's other fields have been filled out $.each($('.' + passalongClass + ".passalongField"), function(index, item) { if (item != null && $(item).val() != "") { isEmpty = false; } }); if (isEmpty) { valid = true; } else { valid = isOneCheckedByClass(passalongClass + ".pg-product");//PG01.pg-product for example.. } return valid; },"Please select at least one product."); <!-- if auto renew checkbox must be checked --> $.validator.addMethod("autoRenewRequired", function(value, element) { var valid = true; if($("#autoRenewCode").is(':checked')){ valid = true; } else{ valid = false; } return valid; },"Please opt-in to the full terms and conditions and privacy policy of the site to place your order"); var regionFieldId = 'regionCode'; var countryFieldId = 'countryCode'; var postalFieldId = 'postalCode'; var countryField = $('#' + countryFieldId); var regionField = $('#' + regionFieldId); $(countryField).bind('change keyup', function() { validateRegionCountry(countryFieldId, regionFieldId); validatePostalCode(countryFieldId, postalFieldId); }); $('#' + regionFieldId).change(function(){ validateRegionCountry(countryFieldId, regionFieldId); validateProvince(regionFieldId, postalFieldId); if($(this).val() === '53'){ if($(countryField).val() === "USA" || $(countryField).val() === "CAN"){ $(countryField).val(""); } $("#country-section").show(); $("#postalCode").removeClass("isRequired"); } else{ $("#postalCode").addClass("isRequired"); if(isProvince(regionFieldId)){ $(countryField).val("CAN"); $(countryField).change(); } else{ $(countryField).val("USA"); $(countryField).change(); } $("#country-section").hide(); } }); if(regionField && $(regionField).val() && $(regionField).val().length > 0){ $(regionField).change(); } if(countryField && $(countryField).val() && $(countryField).val().length > 0){ $(countryField).change(); } $('#' + postalFieldId).bind('change keyup', function () { validateProvince(regionFieldId, postalFieldId); }); $("input[type=submit]").bind("click",function(){ var requiredCustsrvInputs = $("[class*='isRequired']"); $(requiredCustsrvInputs).removeClass("required"); $(requiredCustsrvInputs).valid(); var loginType = $(this).prop("id"); var requiredFormInputs = $("[class*=" + loginType + "-input].isRequired"); requiredFormInputs.addClass("required"); $("#loginType").val(loginType);//submit the loginType in a hidden input so we know what fields to use in the controller }); $.validator.addMethod('usPostalCode', function (value, element) { return (this.optional(element) && $(element).val().length === 0) || /^((\d{5}-?\d{4})|(\d{5}))$/.test(value); },"Please enter a valid US postal code."); }); <!--Validate if province matches first letter of postal code--> function validateProvince(regionCode, postalCode){ var region = '#' + regionCode; var postal = '#' + postalCode; var CanCodes = new Array("AB","BC","MB","NB","NL","NS","NT","NU","ON","PE","QC","SK","YT"); var CanLetters = new Array("T","UV","R","E","A","B","X","X","KLMNP","C","GHJ","S","Y"); var firstLetter = $(postal).val() ? $(postal).val().substring(0,1).toUpperCase() : ""; var validate = false; for (i=0; i < 13; i++){ if ($(region).val() == CanCodes[i]){ if (CanLetters[i].indexOf(firstLetter,0) == -1){ validate = true; } } } if (validate){ $(postal).addClass('province'); }else{ $(postal).removeClass('province'); } if ($(postal).length > 0 && $(postal).val() != "") $(postal).valid(); } function validateCanadianPostalCode(regionCode, postalCode){ var CanCodes = new Array("AB","BC","MB","NB","NL","NS","NT","NU","ON","PE","QC","SK","YT"); var CanLetters = new Array("T","UV","R","E","A","B","X","X","KLMNP","C","GHJ","S","Y"); var $regionEl = $('#' + regionCode); var region = $regionEl.val(); var $postalEl = $('#' + postalCode); var postal = $postalEl.val(); $postalEl.removeClass('province'); if(isProvince(regionCode) && postal){ var provinceIndex = CanCodes.indexOf(region); if(provinceIndex != -1){ var firstLetter = postal.substring(0,1).toUpperCase(); if(CanLetters[provinceIndex].indexOf(firstLetter, 0) == -1) $postalEl.addClass('province'); $postalEl.valid(); } } } <!--Checks if the region selection is a Canadian province--> function isProvince(regionCode){ var CanCodes = new Array("AB","BC","MB","NB","NL","NS","NT","NU","ON","PE","QC","SK","YT"); var province = false; var region = '#' + regionCode; for (i=0; i < 13; i++){ if ($(region).val() == CanCodes[i]){ province = true; } } return province; } <!--Validates that the region and country are a valid combo--> function validateRegionCountry(countryCode, regionCode){ var country = '#' + countryCode; var region = '#' + regionCode; var validate = true; if(isProvince(regionCode)){ if ($(country).val() == "CAN") validate = false; }else if($(region).val() == 53){ if (!($(country).val() == "USA" || $(country).val() == "CAN")) validate = false; }else { if ($(country).val() == "USA") validate = false; } if (validate){ $(country).addClass('country'); }else{ $(country).removeClass('country'); } if ($(country).val() != "" && $(region).val() != "") $(country).valid(); } <!--Validates if the country is not USA--> function isUnitedStates(countryCode){ var country = '#' + countryCode; if ($(country).val() != "USA"){ $(country).addClass('usaOnly'); }else{ $(country).removeClass('usaOnly'); } if ($(country).val() != "") $(country).valid(); } <!--validates the phone number format based on the country--> function validateAllPhone(countryCode, phoneField){ var country = '#' + countryCode; var phone = '#' + phoneField; if($(phone).length){ if ($(phone).val() != ""){ if ( $(country).val() == "USA" || $(country).val() == "CAN" ) { $(phone).removeClass('genericPhone').addClass('phone'); }else{ $(phone).removeClass('phone').addClass('genericPhone'); } }else{ $(phone).removeClass('phone genericPhone'); } <!--re-validate the field--> if( $(phone).val() != "") $(phone).valid(); } } <!--validates phone for USA and CAN ONLY--> function validatePhone(phoneField){ var phone = '#' + phoneField; if ($(phone).val() != ""){ $(phone).addClass('phone'); }else{ $(phone).removeClass('phone '); } <!--re-validate the field--> if( $(phone).val() != "") $(phone).valid(); } <!--validates title--> function validateTitle(titleField){ var title = '#' + titleField; if ($(title).val() != ""){ $(title).addClass('alphaNumericSpaceOnly'); }else{ $(title).removeClass('alphaNumericSpaceOnly error'); } <!--re-validate the field--> $(title).valid(); } <!--validates the postal code based on the country--> function validatePostalCode(countryCode, postalCode){ var country = '#' + countryCode; var postal = '#' + postalCode; var hideRequiredAsterisk = false; if ( $(country).val() == "USA") { $(postal).removeClass('canadaPostalCode').addClass('required usPostalCode'); } else if ( $(country).val() == "CAN" ){ $(postal).removeClass('usPostalCode').addClass('required canadaPostalCode'); } else{ $(postal).removeClass('required usPostalCode canadaPostalCode'); $(postal).valid(); hideRequiredAsterisk = true; } if(hideRequiredAsterisk){ if($(".zip-required-asterisk").length && !$(country).hasClass("billing-address-field")){ $(".zip-required-asterisk").hide(); } else if($(".billing-zip-required-asterisk").length && $(country).hasClass("billing-address-field")){ $(".billing-zip-required-asterisk").hide(); } } else{ if($(".zip-required-asterisk").length && !$(country).hasClass("billing-address-field")){ $(".zip-required-asterisk").show(); } else if($(".billing-zip-required-asterisk").length && $(country).hasClass("billing-address-field")){ $(".billing-zip-required-asterisk").show(); } } <!--re-validate the field--> if( $(postal).length > 0 && $(postal).val() != "") $(postal).valid(); } <!--validates the postal code based for US--> function validateUSPostalCode(postalCode){ var postal = '#' + postalCode; $(postal).addClass('required usPostalCode'); <!--re-validate the field--> $(postal).valid(); } function isCanada($countryEl){ var code = $countryEl.val(); if(code == 'CAN'){ return true; } return false; } <!--OTHER VAlUE - removes any text in the other box --> function removeOtherValue(radioButton, otherTextbox){ var other = '#' + otherTextbox; if ($(radioButton).is(':checked')) { $(other).removeAttr("disabled").addClass("required"); } else { $(other).val("").attr("disabled", true).removeClass("required"); } $(other).valid(); } <!--YES/NO - forward page if user chooses nos --> function yesNo(form, productReceiveName){ var yesNo = $("input[name=" + productReceiveName + "]:checked").val(); if (yesNo == "0") jQuery('form#' + form).unbind('submit').submit(); } <!--Checks if the selected country is allowd print--> function validateDigitalPrint(countryCode, printAllowedArray, alertMsg){ var printArray = printAllowedArray; var country = '#' + countryCode; var printAllowed = false; for (i=0; i < printArray.length; i++){ if ($(country).val() == printArray[i]){ printAllowed = true; break; } } if (printAllowed){ $('#Print').prop('disabled',false); $('#Both').prop('disabled',false); }else{ if($('#Print').is(':checked') || $('#Both').is(':checked') || $("input[id=Print][type='hidden']").length > 0) { alert(alertMsg); } $('#Print').prop('checked', false); $('#Print').prop('disabled',true); $('#Both').prop('checked', false); $('#Both').prop('disabled',true); } } <!--Checks if the selected country is allowed print on responsive forms--> function validateRequestedVersion(countryCode, printAllowedArray){ var printArray = printAllowedArray; var country = '#' + countryCode; var printAllowed = false; for (i=0; i < printArray.length; i++){ if ($(country).val() == printArray[i]){ printAllowed = true; break; } } var foundPrint = false; $("[name*=_RequestedVersion]:checked").each(function() { if ($(this).val() == 'P' || $(this).val() == 'B') { foundPrint = true; } }); if(foundPrint && !printAllowed){ $(country).addClass('print-usa-only'); } else { $(country).removeClass('print-usa-only'); } } <!--Checks if the region selection is a based on the class of the country--> function validateDigitalPrintClass(countryCode, printAllowedArray, alertMsg){ var printArray = printAllowedArray; var country = '#' + countryCode; var printAllowed = false; var classes = $("option:selected", $(country)).attr("class"); for (i=0; i < printArray.length; i++){ if (classes == printArray[i]){ printAllowed = true; break; } } if (printAllowed){ $('#Print').prop('disabled',false); $('#Both').prop('disabled',false); }else{ if($('#Print').is(':checked') || $('#Both').is(':checked')) { alert(alertMsg); } $('#Print').prop('checked', false); $('#Print').prop('disabled',true); $('#Both').prop('checked', false); $('#Both').prop('disabled',true); } } function validateCustomAllPhone(countryCode, phoneField){ var country = '#' + countryCode; var phone = '#' + phoneField; if ($(phone).val() != ""){ if ( $(country).val() == "USA" || $(country).val() == "CAN" ) { $(phone).removeClass('genericPhoneCustom').addClass('phoneCustom'); }else{ $(phone).removeClass('phoneCustom').addClass('genericPhoneCustom'); } }else{ $(phone).removeClass('phoneCustom genericPhoneCustom'); } if( $(phone).val() != "") $(phone).valid(); } function validateCustomPhone(phoneField){ var phone = '#' + phoneField; if ($(phone).val() != ""){ $(phone).addClass('phoneCustom'); }else{ $(phone).removeClass('phoneCustom'); } if( $(phone).val() != "") $(phone).valid(); } var getCreditCard = function(name){ var ccs = []; ccs["visa"] = {prefix: 4, lengths: [13,16]}; ccs["master"] = {prefix: 5, lengths: [16]}; ccs["amex"] = {prefix: 3, lengths: [15]}; return ccs[name.toLowerCase()]; }; function isBlank(value){ if (!value || value.length == 0){ return true; } return !/[^\s]+/.test(value); } </script> <style> .noscriptmsg{display:none;} </style> <noscript> <style type="text/css"> body div, body span, body p, body li, body ul{display:none;} body div.noscriptmsg{ display:block; text-align: center; background-color: white; margin-left: auto; margin-right: auto; width: 50%; padding: 20px; } </style> </noscript> </head> <body> <div class="sub-container row col-centered col-lg-8 col-md-10 col-xs-12"> <div class="sub-content login-content "> <form id="legacyLoginSubmit" action="/ieee/r-login.do" method="post"> <div class="inner-content"> <div id="pageheader"> <a target="_blank" href="http://spectrum.ieee.org/" class="generateOlyticsParams"> <img class="logo-image img-responsive" src="https://cdn.omeda.com/hosted/images/CLIENT_IEEE/SPCD/ieee-logo.png" /> </a> <div class="header-text"> <span>SUBSCRIBER LOGIN</span> </div> </div> <div id="body"> <div class="row"> <div class="col-sm-12 col-md-8"> <input type="hidden" name="loginType" id="loginType" value="" /> <div class="custsrv-login-block"> <h3 class="bold text-center">LOG IN USING YOUR ACCOUNT NUMBER:</h3> <div id="account-info-section-custsrv" class="padding-top"> <div> <label> Enter all 10 digits of your subscription account number (see below) <input id="postalAddressId" name="postalAddressId" type="tel" class="postId loginTextField postal-input isRequired pidWidth" value="" size="10" maxlength="10"/> </label> </div> <div> <label> Enter the first four letters of your last name: <input id="lastNameFirst4" name="lastNameFirst4" spellcheck="false" type="text" class="alphaOptional loginTextField postal-input isRequired" value="" size="4" maxlength="4"/> </label> </div> <img class="img-responsive" src="/ieee/images/mailing_label.gif" /> <div class=" text-center"> <input type="submit" id="postal" value="SUBMIT" class="btn-lg btn-default active submit-button" /> </div> </div> </div> <div> <h3 class="bold main-color text-center">Or</h3> </div> <div class="custsrv-login-block"> <h3 class="bold text-center">LOG IN USING YOUR ADDRESS:</h3> <div class="form-group row"> <label for="firstName" class="col-sm-3 col-xs-12 control-label">First Name:</label> <div class="col-sm-9 col-xs-12"> <input id="firstName" name="firstName" spellcheck="false" type="text" class="alphaApostropheOptional isRequired loginField form-control address-input" value="" maxlength="50"/> </div> </div> <div class="form-group row"> <label for="lastName" class="col-sm-3 col-xs-12 control-label">Last Name:</label> <div class="col-sm-9 col-xs-12"> <input id="lastName" name="lastName" spellcheck="false" type="text" class="isRequired loginField form-control address-input" value="" maxlength="50"/> </div> </div> <div class="form-group row"> <label for="streetAddress" class="col-sm-3 col-xs-12 control-label">Street Address:</label> <div class="col-sm-9 col-xs-12"> <input id="streetAddress" name="streetAddress" spellcheck="false" type="text" class="alphaNumeric loginField form-control address-input" value="" maxlength="50"/> </div> </div> <div class="form-group row"> <label for="city" class="col-sm-3 col-xs-12 control-label">City:</label> <div class="col-sm-9 col-xs-12"> <input id="city" name="city" spellcheck="false" type="text" class="alphaApostropheOptional loginField form-control address-input" value="" maxlength="50"/> </div> </div> <div class="form-group row"> <label for="regionCode" class="col-sm-3 col-xs-12 control-label">State/Province:</label> <div class="col-sm-9 col-xs-12"> <select id="regionCode" name="regionCode" class="input-field isRequired loginField form-control address-input "> <option value="" selected="selected">Select State/Province</option> <option class="USA-state" value="AL">Alabama</option> <option class="USA-state" value="AK">Alaska</option> <option class="USA-state" value="AS">American Samoa</option> <option class="USA-state" value="AZ">Arizona</option> <option class="USA-state" value="AR">Arkansas</option> <option class="USA-state" value="CA">California</option> <option class="USA-state" value="CO">Colorado</option> <option class="USA-state" value="CT">Connecticut</option> <option class="USA-state" value="DE">Delaware</option> <option class="USA-state" value="DC">District of Columbia</option> <option class="USA-state" value="FL">Florida</option> <option class="USA-state" value="GA">Georgia</option> <option class="USA-state" value="GU">Guam</option> <option class="USA-state" value="HI">Hawaii</option> <option class="USA-state" value="ID">Idaho</option> <option class="USA-state" value="IL">Illinois</option> <option class="USA-state" value="IN">Indiana</option> <option class="USA-state" value="IA">Iowa</option> <option class="USA-state" value="KS">Kansas</option> <option class="USA-state" value="KY">Kentucky</option> <option class="USA-state" value="LA">Louisiana</option> <option class="USA-state" value="ME">Maine</option> <option class="USA-state" value="MD">Maryland</option> <option class="USA-state" value="MA">Massachusetts</option> <option class="USA-state" value="MI">Michigan</option> <option class="USA-state" value="MN">Minnesota</option> <option class="USA-state" value="MS">Mississippi</option> <option class="USA-state" value="MO">Missouri</option> <option class="USA-state" value="MT">Montana</option> <option class="USA-state" value="NE">Nebraska</option> <option class="USA-state" value="NV">Nevada</option> <option class="USA-state" value="NH">New Hampshire</option> <option class="USA-state" value="NJ">New Jersey</option> <option class="USA-state" value="NM">New Mexico</option> <option class="USA-state" value="NY">New York</option> <option class="USA-state" value="NC">North Carolina</option> <option class="USA-state" value="ND">North Dakota</option> <option class="USA-state" value="MP">Northern Mariana Islands</option> <option class="USA-state" value="OH">Ohio</option> <option class="USA-state" value="OK">Oklahoma</option> <option class="USA-state" value="OR">Oregon</option> <option class="USA-state" value="PA">Pennsylvania</option> <option class="USA-state" value="PR">Puerto Rico</option> <option class="USA-state" value="RI">Rhode Island</option> <option class="USA-state" value="SC">South Carolina</option> <option class="USA-state" value="SD">South Dakota</option> <option class="USA-state" value="TN">Tennessee</option> <option class="USA-state" value="TX">Texas</option> <option class="USA-state" value="UT">Utah</option> <option class="USA-state" value="VT">Vermont</option> <option class="USA-state" value="VI">Virgin Islands</option> <option class="USA-state" value="VA">Virginia</option> <option class="USA-state" value="WA">Washington</option> <option class="USA-state" value="WV">West Virginia</option> <option class="USA-state" value="WI">Wisconsin</option> <option class="USA-state" value="WY">Wyoming</option> <option class="USA-state" value="-" disabled="disabled">----------------------------------------</option> <option class="USA-state" value="AA">U.S. Military - America (AA)</option> <option class="USA-state" value="AE">U.S. Military - Overseas Europe (AE)</option> <option class="USA-state" value="AP">U.S. Military - Overseas Pacific (AP)</option> <option class="USA-state" value="-" disabled="disabled">----------------------------------------</option> <option class="CAN-state" value="AB">ALBERTA</option> <option class="CAN-state" value="BC">BRITISH COLUMBIA</option> <option class="CAN-state" value="MB">MANITOBA</option> <option class="CAN-state" value="NB">NEW BRUNSWICK</option> <option class="CAN-state" value="NL">NEWFOUNDLAND AND LABRADOR</option> <option class="CAN-state" value="NS">NOVA SCOTIA</option> <option class="CAN-state" value="NT">NORTHWEST TERRITORIES</option> <option class="CAN-state" value="NU">NUNAVUT</option> <option class="CAN-state" value="ON">ONTARIO</option> <option class="CAN-state" value="PE">PRINCE EDWARD ISLAND</option> <option class="CAN-state" value="QC">QUEBEC</option> <option class="CAN-state" value="SK">SASKATCHEWAN</option> <option class="CAN-state" value="YT">YUKON TERRITORY</option> <option class="INT-state" value="-" disabled="disabled">----------------------------------------</option> <option class="INT-state" value="53">I am not in the U.S. or Canada</option> </select> </div> </div> <div class="form-group row"> <label for="countryCode" class="col-sm-3 col-xs-12 control-label">Country:</label> <div class="col-sm-9 col-xs-12"> <select id="countryCode" name="countryCode" class="input-field isRequired loginField form-control shippingCountryCode address-input "> <option value="" selected="selected">Select Country</option> <option region="North America" class="USA" value="USA">United States</option> <option region="North America" class="CAN" value="CAN">Canada</option> </select> </div> </div> <div class="form-group row"> <label for="postalCode" class="col-sm-3 col-xs-12 control-label">Zip/Postal Code:</label> <div class="col-sm-9 col-xs-12"> <input id="postalCode" name="postalCode" spellcheck="false" type="text" class="isRequired loginField form-control address-input" value="" maxlength="10"/> </div> </div> <div class="form-group row"> <label for="emailAddress" class="col-sm-3 col-xs-12 control-label">Email:</label> <div class="col-sm-9 col-xs-12"> <input id="emailAddress" name="emailAddress" spellcheck="false" type="email" class="loginField email form-control address-input" value="" maxlength="80"/> </div> </div> <div class=" text-center"> <input type="submit" id="address" value="SUBMIT" class="btn-lg btn-default active submit-button" /> </div> </div> <div id="new-sub-section"> <div> <h3 class="bold main-color text-center">Or</h3> </div> <div class="custsrv-login-block padding-bottom"> <h3 class="text-center"> <a href="/ieee/r-paid.do" class="underline login-content-bullets">Start a new subscription</a> </h3> </div> </div> </div> <div class="hidden-xs hidden-sm col-md-4"> <img id="csCoverImage" src="https://cdn.omeda.com/hosted/images/CLIENT_IEEE/SPCD/ieee-cover.jpg" class="img-responsive" alt="IEEE Spectrum" /> </div> </div> </div> <div id="pagefooter"> <div class="row"> <div class="col-xs-12"> <div id="footer" class="text-center thin-border-top col-xs-12"> <div class="text-left"><img src="/ieee/images/ieeelogosm.gif" width="82" height="25" hspace="0"></div></br> <div>Your name and address information including email address will be used to correspond with you regarding your subscription, and to send you newsletters and other relevant information. You may withdraw your consent at any time by updating your preferences or by clicking unsubscribe in emails you receive. Please view our full <a href="http://www.ieee.org/security_privacy.html" class="main-color">Privacy Policy</a> for more details. </div></br> <div> IEEE Spectrum </br> 3 Park Avenue, 17th Floor</br> New York, NY 10016-5997 USA </div></br> <div>To contact customer service, please email <a href="mailto:ieee@omeda.com?subject=IEEE Spectrum" class="main-color bold">ieee@omeda.com</a> or call in U.S toll free +1 866 363 2304 for International calls: 001 615 377 3322 </div></br> </div> </div> </div> </div> </div> </form> </div> </div> <div class="noscriptmsg"> This site requires JavaScript. Please enable JavaScript in your browser's settings and reload the page. </div> </body> </html>