PageSourceSearch

https://www.alamaterialhandling.com/assets/js/formvalidation.js

js alamaterialhandling.com collected 2026-10-04 03:13:01 UTC 2,392 bytes, 106 lines download raw bytes

1
2
3$(document).ready(function() {
4 
5 $("#submit").click(function() {
6 //alert('sdfds');
7 var ccode = $("#ccode").val();
8 var first_name = $("#first_name").val();
9 var email = $("#email").val();
10 var phone = $("#phone").val();
11 var company = $("#company").val();
12 //var subject = $("#subject").val();
13 var message = $("#message").val();
14 
15 var actionVal = $("#actionVal").val();
16 if(first_name.trim() == ''){
17		$("#errorMsgName").html('<span>Please Enter Your Name</span>');
18		return false;
19 }else{
20	 $("#errorMsgName").html('');
21 }
22 if(email.trim() == ''){
23	 $("#errorMsgEmail").html('<span>Please Enter Your Email</span>');
24	 return false;
25 }else{
26	 if(IsEmail(email)==false){
27          $('#errorMsgEmail').html('<span>Please Enter Valid Email</span>');
28          return false;
29        }else{
30		$("#errorMsgEmail").html('');
31		}
32 }
33 if(phone.trim() == ''){
34	 $("#errorMsgPhone").html('<span>Please Enter Your Phone</span>');
35	 return false;
36 }else{
37	 $("#errorMsgPhone").html('');
38 }
39 if(company.trim() == ''){
40	 $("#errorMsgCompany").html('<span>Please Enter Your Company Name</span>');
41	 return false;
42 }else{
43	 $("#errorMsgCompany").html('');
44 }
45 //if(subject.trim() == ''){
46	// $("#errorMsgSubject").html('<span>Please Enter Your Subject</span>');
47	 //return false;
48// }else{
49	// $("#errorMsgSubject").html('');
50 //}
51 if(message.trim() == ''){
52	 $("#errorMsg1").html('<span>Please Enter Your Details/Requirments</span>');
53	 return false;
54 }else{
55	 $("#errorMsg1").html('');
56 }
57 if(ccode.trim() == ''){
58	 $("#errorMsg").html('<span>Please Enter Captcha Code</span>');
59	 return false;
60 }else{
61	 $("#errorMsg").html('');
62 }
63 
64 //alert('ccode---'+ccode);
65 //alert('actionVal---'+actionVal);
66 $.ajax({
67 type: "POST",
68 url: "contactus.php",
69 data: {
70 ccode: ccode ,
71 action:actionVal,
72 name:first_name,
73 email:email,
74 cname:company,
75 phone_number:phone,
76 message:message
77 },
78 cache: false,
79 success: function(data) {
80 
81 if(data == "Yes"){
82	 window.location.href = "thanks.html";
83 }else{
84		//alert(data);
85		$("#ccode").val('');
86		$("#errorMsg").html('<span>Please Enter correct Captcha code</span>');
87 }
88 },
89 error: function(xhr, status, error) {
90 alert('Error');
91 console.error(xhr);
92 }
93 });
94 
95 });
96 
97 });
98 function IsEmail(email) {
99  var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
100  if(!regex.test(email)) {
101    return false;
102  }else{
103    return true;
104  }
105}
106	

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.