1 2// console.log('00'); 3 4function mess(e){ 5 6 7 // console.log('44'); 8 $('button[type="submit"]').text('Sending...'); 9 10 11 var form = $('form#contact_form'); 12 13 // console.log(form); 14 // console.log(form[0]); 15 16 $.ajax({ 17 type: "POST", 18 url: 'contact-form/handler.php', 19 data: form.serialize(), 20 dataType: 'json' 21 }).done(function (data) { 22 // Call the after_form_submitted() function and pass the AJAX response 23 after_form_submitted(data); 24 }).fail(function (jqXHR, textStatus, errorThrown) { 25 after_form_submitted(jqXHR.responseText); 26 }); 27 28 // console.log('55'); 29 30 e.preventDefault(); 31 32 } 33 34function after_form_submitted(data) { 35 // console.log('22'); 36 // console.log(data); 37 if (data == 'Message has been sent') { 38 // console.log('33'); 39 $('form#contact_form').hide(); 40 $('#success_message').show(); 41 //alert('Message has been sent'); 42 } else { 43 alert('Sending fails...'); 44 jQuery.each(data.errors, function (key, val) { 45 Swal.fire({ 46 icon: 'error', 47 title: key.substr(0,1).toUpperCase()+key.substr(1), 48 text: val 49 }) 50 }); 51 52 //reverse the response on the button 53 $('button[type="button"]', $form).each(function () { 54 $btn = $(this); 55 label = $btn.prop('orig_label'); 56 if (label) { 57 $btn.prop('type', 'submit'); 58 $btn.text(label); 59 $btn.prop('orig_label', ''); 60 } 61 }); 62 63 }//else 64} 65 66$(function () { 67 68 // console.log('11'); 69 70 $("#message").on("input", function() { 71 $(this).val($(this).val().replace(/[\r\n\v]+/g, '')); 72 length = $(this).val().length; 73 if (length > 0) { 74 $(".button.button-submit").addClass("button-active"); 75 $(".button.button-submit").removeClass("button-submit"); 76 } else { 77 $(".button.button-active").addClass("button-submit"); 78 $(".button.button-active").removeClass("button-active"); 79 } 80 }); 81}); 82 83$(function () { 84 $('#captcha_reload').on('click', function (e) { 85 e.preventDefault(); 86 d = new Date(); 87 var src = $("img#captcha_image").attr("src"); 88 src = src.split(/[?#]/)[0]; 89 90 $("img#captcha_image").attr("src", src + '?' + d.getTime()); 91 }); 92});
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.