1$("#contactForm").validator().on("submit", function (event) { 2 if (event.isDefaultPrevented()) { 3 // handle the invalid form... 4 formError(); 5 submitMSG(false, "Did you fill in the form properly?"); 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 19 var message = $("#message").val(); 20 21 22 $.ajax({ 23 type: "POST", 24 url: "https://www.mofed.gov.et/feedback", 25 data: "name=" + name + "&email=" + email + "&message=" + message, 26 success : function(text){ 27 if (text == "success"){ 28 formSuccess(); 29 } else { 30 formError(); 31 submitMSG(false,text); 32 } 33 } 34 }); 35} 36 37function formSuccess(){ 38 $("#contactForm")[0].reset(); 39 submitMSG(true, "Message Submitted!") 40} 41 42function formError(){ 43 $("#contactForm").removeClass().addClass('shake animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ 44 $(this).removeClass(); 45 }); 46} 47 48function submitMSG(valid, msg){ 49 if(valid){ 50 var msgClasses = "h3 text-left tada animated text-success"; 51 } else { 52 var msgClasses = "h3 text-left text-danger"; 53 } 54 $("#msgSubmit").removeClass().addClass(msgClasses).text(msg); 55}
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.