1$("#contactForm").validator().on("submit", function (event) { 2 if (event.isDefaultPrevented()) { 3 // handle the invalid form... 4 formError(); 5 submitMSG(false, " "); 6 } else { 7 // everything looks good! 8 event.preventDefault(); 9 submitForm(); 10 } 11}); 12 13 14function submitForm(){ 15 // Initiate Variables With Form Content 16 var name = $("#name").val(); 17 var email = $("#email").val(); 18 var department = $("#department").val(); 19 var subject = $("#subject").val(); 20 var message = $("#message").val(); 21 var recaptcha = $("#recaptchaResponse").val(); 22 23 $.ajax({ 24 type: "POST", 25 url: "https://adspot.co/assets/js/contact/form-process.php", 26 data: { 27 name: name, 28 email: email, 29 department: department, 30 subject: subject, 31 message: message, 32 recaptcha_response: recaptcha 33 }, 34 success : function(text){ 35 if (text == "success"){ 36 formSuccess(); 37 } else { 38 formError(); 39 submitMSG(false,text); 40 } 41 } 42 }); 43} 44 45function formSuccess(){ 46 $("#contactForm")[0].reset(); 47 submitMSG(true, "Your message was sent! We'll contact you shortly.") 48} 49 50function formError(){ 51 $("#contactForm").removeClass().addClass('shake animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ 52 $(this).removeClass(); 53 }); 54} 55 56function submitMSG(valid, msg){ 57 if(valid){ 58 var msgClasses = "h3 text-center tada animated text-success"; 59 } else { 60 var msgClasses = "h3 text-center text-danger"; 61 } 62 $("#msgSubmit").removeClass().addClass(msgClasses).text(msg); 63}
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.