';$("#submit").before(html);$("#submit").css("display","none");} if ($("input[class='datePicker']").length) { $("input[class='datePicker']").datepicker({ mandatory: true, buttonImage: '/empoweren/skins/original/images/btnDatePicker.gif', buttonImageOnly: true, showOn: 'both', buttonText: 'Choose a date' }); }// hide inputs from users$('#form-sub-ant-spm-33537, #form-sub-ant-spm-2-33537').hide();// get answer var answer = $('#form-sub-ant-spm-33537 input#ant-spm-a').val();// put answer into other input $('#form-sub-ant-spm-33537 input#ant-spm-q').val(answer);});function pageNext() { validate_submit(); removeErrorBox(); if (pageErrors != "") { addErrorBox('submit', pageErrors); } else { $("#page-"+currentPage).css("display","none"); currentPage++; $("#page-"+currentPage).css("display","inline"); $("#pageBack").removeClass('hidden'); if (currentPage == totalPage) { $("#pageNext").addClass('hidden'); $("#submit").css("display","inline"); } $('html, body').animate({ scrollTop: 0 }, 0); }}function pageBack() { removeErrorBox(); $("#page-"+currentPage).css("display","none");currentPage--;$("#page-"+currentPage).css("display","inline");$("#pageNext").removeClass('hidden');$("#submit").css("display","none");if (currentPage == 1) {$("#pageBack").addClass('hidden');}}function isNumber1(number) {return(number.replace(/[^0-9,.]/g, ""));}function isNumber2(number) {return(number.replace(/[^0-9.]/g, ""));}function checkNumber(name) {$("input[name="+name+"]").val(isNumber1($("input[name="+name+"]").val()));}function validate_submit() { var valid = true;var errors = ""; var numPageBreaks = 0; pageErrors = ""; removeErrorBox(); jQuery.each(jsonElements, function(i, val) { // set variable for only the items on the page if multiple pages if (val.type == "page_break") { numPageBreaks++; if (numPageBreaks == currentPage) { pageErrors = errors; } } if (val.is_required == 1 && val.validation == '') {switch (val.type) {case "text":if (trim($('input[name="'+val.id+'"]').val()) == '') {if (valid == false) { errors += "
"; }errors += 'Please complete field: "'+val.label+'"';valid = false;}break;case "textarea":if (trim($('textarea[name="'+val.id+'"]').val()) == '') {if (valid == false) { errors += "
"; }errors += 'Please complete field: "'+val.label+'"';valid = false;}break;case "radio":if ($('input[name="'+val.id+'"]:checked').val() == undefined) {if (valid == false) { errors += "
"; }errors += 'Please complete field: "'+val.label+'"';valid = false;}break;case "checkbox":if ($('input[name^="'+val.id+'-"]:checked').length == 0) {if (valid == false) { errors += "
"; }errors += 'Please complete field: "'+val.label+'"';valid = false;}break;case "select": if ($("select[name="+val.id+"] option:selected").prop("disabled")) { if (valid == false) { errors += "
"; }errors += 'Please complete field: "'+val.label+'"'; valid = false; }break;case "digital_signature":if (trim($('input[name="'+val.id+'-dsSig"]').val()) == '' || trim($('input[name="'+val.id+'-dsDate"]').val()) == '') {if (valid == false) { errors += "
"; }errors += 'Please complete field: "'+val.label+'"';valid = false;}break;case "Etext":break;case "EmultiText":break;case "Eselect":break;case "simple_name":if (trim($('input[name="'+val.id+'-first"]').val()) == '' || trim($('input[name="'+val.id+'-last"]').val()) == '') {if (valid == false) { errors += "
"; }errors += 'Please complete field: "'+val.label+'"';valid = false;}break;case "address":if (trim($('input[name="'+val.id+'-street"]').val()) == '' ||trim($('input[name="'+val.id+'-city"]').val()) == '' ||trim($('input[name="'+val.id+'-state"]').val()) == '' ||isNumber($('input[name="'+val.id+'-zip"]').val()).length != 5) {if (valid == false) { errors += "
"; }errors += 'Please complete field: "'+val.label+'"';valid = false;}if (checkInternationalPhone($('input[name="'+val.id+'-phone"]').val()) === false) {if (valid == false) { errors += "
"; }errors += 'Please enter a valid phone number';valid = false;}if (isEmail($('input[name="'+val.id+'-email"]').val()) == false) {if (valid == false) { errors += "
"; }errors += 'Please enter a valid e-mail address';valid = false;}break;case "date_picker":if (trim($('input[name="'+val.id+'"]').val()) == '') {if (valid == false) { errors += "
"; }errors += 'Please complete field: "'+val.label+'"';valid = false;}break;case "email":if (isEmail($('input[name="'+val.id+'"]').val()) == false) {if (valid == false) { errors += "
"; }errors += 'Please enter a valid e-mail address';valid = false;}break; case "file":if (trim($('input[name="'+val.id+'"]').val()) == '') {if (valid == false) { errors += "
"; }errors += 'Please complete field: "'+val.label+'"';valid = false;}break;}}if (val.validation != '' && (val.is_required == 1 || $('input[name="'+val.id+'"]').val() != '')) {switch (val.validation) {case "phone":if (checkInternationalPhone($('input[name="'+val.id+'"]').val()) === false) {if (valid == false) { errors += "
"; }errors += 'Please enter a valid phone number';valid = false;}break;case "email":if (isEmail($('input[name="'+val.id+'"]').val()) == false) {if (valid == false) { errors += "
"; }errors += 'Please enter a valid e-mail address';valid = false;}break;}}}); if (valid == false) {addErrorBox('submit', errors);}else { // disable submit button so you can't duplicate submits$("#submit").prop("disabled", true);$("#submit").val("Please Wait..."); } return valid;}function trim(str) {return str.replace(/^\s+|\s+$/g,'');}function isNumber(number) {return(number.replace(/[^0-9]/g, ""));}function isPhone(phone) {return(phone.match(/^[\(]?(\d{0,3})[\)]?[\s]?[\-]?(\d{3})[\s]?[\-]?(\d{4})$/));}function checkInternationalPhone(strPhone) {var digits = "0123456789";// non-digit characters which are allowed in phone numbersvar phoneNumberDelimiters = "()- ";// characters which are allowed in international phone numbers// (a leading + is OK)var validWorldPhoneChars = phoneNumberDelimiters + "+";// Minimum no of digits in an international phone no.var minDigitsInIPhoneNumber = 10;function isInteger(s){ var i;for (i = 0; i "9"))) return false;}// All characters are numbers.return true;}function trim(s) {var i;var returnString = "";// Search through string's characters one by one.// If character is not a whitespace, append to returnString.for (i = 0; i 1) return falseif(strPhone.indexOf("-")!=-1)bracket=bracket+1if(strPhone.indexOf("(")!=-1 && strPhone.indexOf("(")>bracket)return falsevar brchr=strPhone.indexOf("(")if(strPhone.indexOf("(")!=-1 && (strPhone.charAt(brchr+3)!=")" && strPhone.charAt(brchr+4)!=")"))return falseif(strPhone.indexOf("(")==-1 && strPhone.indexOf(")")!=-1)return falses=stripCharsInBag(strPhone,validWorldPhoneChars);return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);}function isEmail(str) {return /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(str);}function removeErrorBox() {if (document.getElementById("errors")) {var removeDiv = document.getElementById("errors");removeDiv.parentNode.removeChild(removeDiv);}}function addErrorBox(id, errors) {removeErrorBox();$("#"+id).before(''+errors+'
');}
Terimakasih anda telah membaca artikel tentang Wiese Electric Pallet Jacks Walkies for Rental. Jika ingin menduplikasi artikel ini diharapkan anda untuk mencantumkan link https://pall-et.blogspot.com/2016/06/wiese-electric-pallet-jacks-walkies-for.html. Terimakasih atas perhatiannya.