1jQuery(document).ready(function() { 2/* Version 1.0.1 3 * Made in conjunction with plugin V1.0.4 4 * Makes the url reference to SugarCRM as https 5*/ 6 jQuery( "#newchurch-contact-webtolead_email1" ).focus(function() { 7 jQuery(".newchurch-contact-error").hide(); 8 }); 9 10 jQuery( "#newchurch-contact-questions_comments_c" ).focus(function() { 11 jQuery(".newchurch-contact-error").hide(); 12 }); 13 14 jQuery( "#newchurch-contact-last_name" ).focus(function() { 15 jQuery(".newchurch-contact-error").hide(); 16 }); 17 18 19 jQuery("#newchurch-contact-form").unbind("submit"); 20 jQuery("#newchurch-contact-form").submit(function(e) { 21 this.action='https://leliahoward.sugarondemand.com/index.php?entryPoint=WebToLeadCapture';return true; 22 }); 23 24 jQuery("#newchurch-contact-send").click(function() { 25 26 jQuery(".newchurch-contact-error").hide(); 27 var hasError = false; 28 var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; 29 30 var nameVal =jQuery("#newchurch-contact-last_name").val(); 31 if (nameVal =='') { 32 jQuery("#newchurch-contact-last_name").after('<br /><span class="newchurch-contact-error">Please enter your First and Last Name.</span>'); 33 hasError = true; 34 } 35 36 var emailaddressVal = jQuery("#newchurch-contact-webtolead_email1").val(); 37 if(emailaddressVal == '') { 38 jQuery("#newchurch-contact-webtolead_email1").after('<br /><span class="newchurch-contact-error">Please enter your email address.</span>'); 39 hasError = true; 40 } 41 42 else if(!emailReg.test(emailaddressVal)) { 43 jQuery("#newchurch-contact-webtolead_email1").after('<br /><span class="newchurch-contact-error">Enter a valid email address.</span>'); 44 hasError = true; 45 } 46 47 var questionVal = jQuery("#newchurch-contact-questions_comments_c").val(); 48 if(questionVal == '') { 49 jQuery("#newchurch-contact-questions_comments_c").after('<p class="newchurch-contact-error">Please enter your question or comment.</p>'); 50 hasError = true; 51 } 52 53 if(hasError == true) { return false; } 54 55 }); 56 57// Now provide processing for footer contact forms 58 59 jQuery( "#newchurch-footer-contact-webtolead_email1" ).focus(function() { 60 jQuery(".newchurch-contact-error").hide(); 61 }); 62 63 jQuery( "#newchurch-footer-contact-questions_comments_c" ).focus(function() { 64 jQuery(".newchurch-contact-error").hide(); 65 }); 66 67 jQuery( "#newchurch-footer-contact-last_name" ).focus(function() { 68 jQuery(".newchurch-contact-error").hide(); 69 }); 70 71 72 jQuery("#newchurch-footer-contact-send").click(function() { 73 74 jQuery(".newchurch-contact-error").hide(); 75 var hasError = false; 76 var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; 77 78 var lastnameVal = jQuery("#newchurch-footer-contact-last_name").val(); 79 if(lastnameVal == '') { 80 jQuery("#newchurch-footer-contact-last_name").after('<br /><span class="newchurch-contact-error">Please enter your name.</span>'); 81 hasError = true; 82 } 83 84 var emailaddressVal = jQuery("#newchurch-footer-contact-webtolead_email1").val(); 85 if(emailaddressVal == '') { 86 jQuery("#newchurch-footer-contact-webtolead_email1").after('<br /><span class="newchurch-contact-error">Please enter your email address.</span>'); 87 hasError = true; 88 } 89 90 else if(!emailReg.test(emailaddressVal)) { 91 jQuery("#newchurch-footer-contact-webtolead_email1").after('<br /><span class="newchurch-contact-error">Enter a valid email address.</span>'); 92 hasError = true; 93 } 94 95 var questionVal = jQuery("#newchurch-footer-contact-questions_comments_c").val(); 96 if(questionVal == '') { 97 jQuery("#newchurch-footer-contact-questions_comments_c").after('<p class="newchurch-contact-error">Please enter your question or comment.</p>'); 98 hasError = true; 99 } 100 101 if(hasError == true) { return false; } 102 103 });
104 105});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.