1function enableBtn(){ 2 $("#submit").prop("disabled", false); 3 } 4 $("#myform").submit(function(event){ 5 event.preventDefault(); 6 submitForm(); 7 }); 8 $(document).on("blur", ".downtown_query_form", function(){ 9 var key_value = $(this).attr("name"); 10 var data_value = $(this).val(); 11 12 13 if(key_value == "name") { 14 if(/^[A-Za-z ]+$/.test(data_value)) { 15 $('#success_message').html(''); 16 } else { 17 $('#success_message').html('* Enter a valid name.'); 18 $("#success_message").css({"color": "red"}); 19 return; 20 } 21 } 22 if(key_value == "email") { 23 if(/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/.test(data_value)) { 24 $('#success_message').html(''); 25 } else { 26 $('#success_message').html('* Enter a valid email.'); 27 $("#success_message").css({"color": "red"}); 28 return; 29 } 30 } 31 if(key_value == "phone") { 32 if(data_value.length == 10){ 33 $('#success_message').html(''); 34 } else { 35 $('#success_message').html('* Enter a valid phone.'); 36 $("#success_message").css({"color": "red"}); 37 return; 38 } 39 if(/^[0-9]+$/.test(data_value)) { 40 $('#success_message').html(''); 41 } else { 42 $('#success_message').html('* Enter a valid phone.'); 43 $("#success_message").css({"color": "red"}); 44 return; 45 } 46 } 47 }); 48 function submitForm(){ 49 // Initiate Variables With Form Content 50 var name = $("#footer_name").val(); 51 var email = $("#footer_email").val(); 52 var phone = $("#footer_phone").val(); 53 var message = $("#footer_msz").val(); 54 55 $.ajax({
56 type: "POST", 57 url: "<?php echo SITE_ROOT_URL?>/includes/savemail.php", 58 data: "name=" + name + "&email=" + email + "&phone=" + phone + "&message=" + message, 59 success : function(text){ 60 $("#success_message").html("Enquiry Sent successfully....."); 61 $("#success_message").css("color","green"); 62 $('#myform')[0].reset(); 63 grecaptcha.reset(); 64 setTimeout(function(){ 65 $('#success_message').html(''); 66 }, 2000); 67 68 }, 69 error : function(text) { 70 $("#success_message").html("Something went wrong....."); 71 } 72 }); 73 }
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.