Unique online business ideas (with real-life examples & why they work)

We're Giving Away An Amazing FREE Money Making Offer. Would You Jump For Joy If You Can Download 12 FREE Websites In 2021? They Come Preloaded With Content And Ads. Click The Link Below To Register

https://demosites.onlinebizopps.info/share-demosites/?c1Le

alert offer.png

Clickbank Marketing Tools

<![CDATA[// <![CDATA[ var submit_this = false; function iwt_validate_email(email) { if (email.length < 2) { return true; } else { if (check_email_format(email)) { return true; } else { return false; } } } function iwt_validate_(form_name, submit_anyways) { if (submit_anyways === true) { return true; } var obj = validate_email_(form_name); if (obj.success == true) { return true; } else { // we need to build the dom elements using pure js var warn = document.createElement("div"); warn.className = "email_warning"; var warn_text = document.createTextNode(obj['error_msg']); warn.appendChild(warn_text); jQuery('.validate_email').addClass('invalid').append(warn); //div id="validation_modal" class="email_warning_modal" var modal = document.createElement("div"); modal.className = "email_warning_modal"; modal.id = "validation_modal"; // div class="email_warning_modal_dialog" var modal_html = document.createElement("div"); modal_html.className = "email_warning_modal_dialog"; var modal_html_p = document.createElement("p"); var modal_html_b = document.createElement("b"); var modal_html_br = document.createElement("br"); var modal_html_b_text = document.createTextNode("Oops! This doesn't look right…"); modal_html_b.appendChild(modal_html_b_text); modal_html_p.appendChild(modal_html_b); modal_html_p.appendChild(modal_html_br); modal_html_p.appendChild(modal_html_br); var modal_html_p_text = document.createTextNode("Is " + obj.email + " a valid email address?"); modal_html_p.appendChild(modal_html_p_text); modal_html.appendChild(modal_html_p); var modal_html_buttons = document.createElement("div"); modal_html_buttons.className = "email_btn_wrapper"; var modal_html_button_correct = document.createElement("div"); modal_html_button_correct.className = "email_btn correct"; modal_html_button_correct.id = "correct"; var modal_html_button_correct_text = document.createTextNode("No, let me correct it…"); modal_html_button_correct.appendChild(modal_html_button_correct_text); modal_html_buttons.appendChild(modal_html_button_correct); var modal_html_button_confirmed = document.createElement("div"); modal_html_button_confirmed.className = "email_btn confirmed_as_valid"; modal_html_button_confirmed.id = "confirm"; var modal_html_button_confirmed_text = document.createTextNode("Yes, it's fine"); modal_html_button_confirmed.appendChild(modal_html_button_confirmed_text); modal_html_buttons.appendChild(modal_html_button_confirmed); modal_html.appendChild(modal_html_buttons); modal.appendChild(modal_html); jQuery('body').append(modal); var validate_modal = $('#validation_modal'); jQuery('#validation_modal').on('click', function () { jQuery(this).slideUp('fast'); jQuery(this).detach(); submit_this = true; }); jQuery('#confirm').on('click', function () { jQuery('#validation_modal').slideUp('fast'); jQuery('#validation_modal').detach(); submit_this = true; jQuery('#email_submission').submit(); }); jQuery('#correct').on('click', function () { jQuery('#validation_modal').slideUp('fast'); jQuery('#validation_modal').detach(); jQuery('.validation_check').removeClass('input_valid'); submit_this = true; }); return false; } } function validate_email_(form_name) { //console.log("form name: " + form_name); //console.log(document.forms[form_name]); var this_form = document.forms[form_name], this_email_input = this_form.elements.namedItem("Email"), this_email_input_classname = this_email_input.className, this_email = this_email_input.value, invalid_ext = ['.con', '.coml', '.lcom', '.cim', '.c', '.cin', '.ckm', '.clm', '.clom', '.cmo', '.coim', '.cok', '.cocm', '.col', '.com.com', '.coma', '.comcom', '.come', '.comg', '.comi', '.comj', '.comk', '.comd', '.comb', '.comh', '.comi', '.comm', '.conn', '.commail', '.commm', '.comn', '.como', '.comp', '.comq', '.comr', '.comt', '.comu', '.comy', '.conm', '.coom', '.copm', '.cp', '.cpm', '.dom', '.fom', '.ocm', '.v', '.vom', '.xom', '.xvom', '.xcom', '.ney', '.nett', '.nwt'], common_errors = ['gamil.com', 'gmai.com', 'gmil.com', 'gmal.com', 'gail.com', 'g.mail.com', 'fmail.com', 'gamail.com', 'ggmail.com', 'gmaail.com', 'gmaial.com', 'gmaii.com', 'gmali.com', 'gmaial.com', 'gmaiil.com', 'gmaik.com', 'g-mail.com', 'gmail.net', 'gmailc.om', 'gmailc.com', 'gmaill.com', 'gmailm.com', 'gmails.com', 'gmailm.com', 'gmails.com', 'gmaim.com', 'gmaio.com', 'gmaijl.com', 'gmali.com', 'gmamil.com', 'gmaol.com', 'gmaul.com', 'gmial.com', 'gmmail.com', 'gmqil.com', 'gnail.com', 'comast.net', 'comcadt.net', 'comcas.net', 'comcasr.net', 'comcasst.net', 'comcat.net', 'comcasst.net', 'comcst.net', 'comcsst.net', 'concast.net', 'comcast.nt', 'hitmail.com', 'homail.com', 'hotamail.com', 'hormail.com', 'hotmai.com', 'hotmaiil.com', 'hotmaill.com', 'hotmal.com', 'hotmaul.com', 'hotmial.com', 'hotmsil.com', 'hotnail.com', 'hoymail.com', 'hptmail.com', 'htmail.com', 'htomail.com', 'otmail.com', 'outlok.com', 'oulook.com', 'uahoo.com', 'yagoo.com', 'yaho.com', 'yahooo.com', 'yahool.com', 'yahpp.com', 'yahop.com', 'yshoo.com', 'yyahoo.com', 'ail.com', 'aol.con', 'oal.com']; //console.log(this_email_input, this_email_input_classname, this_email); // check for format errors (relaxed, not strict version of this check) if (check_email_format(this_email)) { //console.log('this email is ok: ' + this_email); // parse this email at the @ symbol var this_email_arr = this_email.split('@'), this_email_after_at = this_email_arr[1], this_email_suffix_arr = this_email_after_at.split('.'), errors = [], this_email_suffix = '.' + this_email_suffix_arr[this_email_suffix_arr.length – 1], ret_obj = {'success': false}; //console.log(this_email_arr, this_email_after_at); invalid_ext.forEach(function (suffix) { var result = thisEndsWith(this_email_suffix, suffix); if (typeof result != 'undefined') { //console.log(suffix, result); return errors.push(result); } else { //console.log('suffix check ok… ' + this_email_suffix + '!=' + suffix); } }); common_errors.forEach(function (suffix) { var result = thisMatches(this_email_after_at, suffix); if (typeof result != 'undefined') { //console.log(suffix, result); return errors.push(result); } else { //console.log('common errors check ok… "' + this_email_after_at + '"!="' + suffix + '"'); } }); //console.log(errors); if (errors.length) { var error_msg = 'Formatting Error: '' + errors[0] + '''; ret_obj['error_msg'] = error_msg; ret_obj['errors'] = errors; ret_obj['email'] = this_email; this_email_input.className = this_email_input_classname + ' input_warning'; return ret_obj; } else { //console.log(errors); ret_obj['success'] = true; ret_obj['email'] = this_email; return ret_obj; } } else { var error_msg = 'didn't pass format check ' + this_email; ret_obj['error_msg'] = error_msg; ret_obj['email'] = this_email; return ret_obj; } function thisEndsWith(str, suffix) { if (str.indexOf(suffix, str.length – suffix.length) !== -1) { return suffix; } } function thisMatches(str, suffix) { //if ((/suffix/i).test(str)) { if (str.toUpperCase() == suffix.toUpperCase()) { return suffix; } else { return undefined; } } } // endo of email validation function; function check_email_format(submission) { var str = submission, return_result = false, filter = /^[^[email protected]][email protected][^[email protected]]+.[^[email protected]]+$/; if (filter.test(str)) { return_result = true; } return return_result; } document.addEventListener("DOMContentLoaded", function () { var emailform_carrot1 = jQuery('#carrot1'); //console.log(emailform_carrot1); emailform_carrot1.on('submit', function (ev) { //ev.preventDefault(); //console.log('———–EMAIL FORM SUBMITTED—————'); var email_field = jQuery(this).find('input[name="Email"]'); email_field.addClass('validation_check'); if (!email_field.val().length) { email_field.addClass('input_invalid'); var warn_blank = document.createElement("div"); warn_blank.className = "email_warning"; var warn_blank_text = document.createTextNode("Email can't be blank!"); warn_blank.appendChild(warn_blank_text); email_field.parent().addClass('invalid').append(warn_blank); return false; } else { email_field.parent().removeClass('invalid'); } var name_field = $(this).find('input[name="Name"]'); if (!name_field.val().length) { name_field.addClass('input_invalid'); var name_blank = document.createElement("div"); name_blank.className = "email_warning"; var name_blank_text = document.createTextNode("Name can't be blank!"); name_blank.appendChild(name_blank_text); name_field.parent().addClass('invalid').append(name_blank); return false; } else { name_field.parent().removeClass('invalid'); } //ev.preventDefault(); //console.log('submitted'); var this_form_name = $(this).attr('name'); //console.log('THIS NAME:', this_form_name); //return false; var submit_is_valid = iwt_validate_(this_form_name, submit_this); //console.log(submit_is_valid, this_form_name, submit_this); if (submit_is_valid) { //console.log('submit is valid'); return true; } else { //console.log('submit is invalid'); return false; } }); var email_field_carrot1 = jQuery('#carrot1 .validate_email input'); //console.log(email_field_carrot1); email_field_carrot1.on('keyup', function () { var this_input = jQuery(this); // delay if they are still typing var stoppedtyping = false; var $email = this.value; var valid = iwt_validate_email($email); //console.log('stopped typing? ', stoppedtyping); //console.log(valid, $email); delay(function () { stoppedtyping = true; var $delay_email = email_field_carrot1.val(); // they may have auto filled, we have to select it again //console.log($delay_email); var validAfterDelay = iwt_validate_email($delay_email); //console.log('stopped typing? ', stoppedtyping); setValidState('carrot1', validAfterDelay, stoppedtyping); }, 5000); setValidState('carrot1', valid, stoppedtyping); }); }); var delay = (function () { var timer = 0; return function (callback, ms) { clearTimeout(timer); timer = setTimeout(callback, ms); }; })(); function setValidState(formId, valid, stoppedtyping) { var $input = jQuery('#' + formId + ' .validate_email input'); //console.log($input); //console.log($input.val(), valid, stoppedtyping); $input.addClass('testing'); if ($input.val().length

Source

Leave a Comment

Your email address will not be published. Required fields are marked *

http://adfoc.us/serve/sitelinks/?id=573083&url=https://demosites.onlinebizopps.info//