PageSourceSearch

https://www.stjamesdental.co.uk/form/captcha.js?ver=1791244044

js stjamesdental.co.uk collected 2026-10-05 23:47:43 UTC 3,298 bytes, 113 lines download raw bytes

1function echeck(str) {
2	str = trim(str);
3	var at = "@"
4	var dot = "."
5	var lat = str.indexOf(at)
6	var lstr = str.length
7	var ldot = str.indexOf(dot)
8	if (str.indexOf(at) == -1) {
9		return false
10	}
11
12	if (str.indexOf(at) == -1 || str.indexOf(at) == 0 || str.indexOf(at) == lstr) {
13		return false
14	}
15
16	if (str.indexOf(dot) == -1 || str.indexOf(dot) == 0 || str.indexOf(dot) == lstr) {
17		return false
18	}
19
20	if (str.indexOf(at, (lat + 1)) != -1) {
21		return false
22	}
23
24	if (str.substring(lat - 1, lat) == dot || str.substring(lat + 1, lat + 2) == dot) {
25		return false
26	}
27
28	if (str.indexOf(dot, (lat + 2)) == -1) {
29		return false
30	}
31
32	if (str.indexOf(" ") != -1) {
33		return false
34	}
35
36	return true
37}
38
39function trim(s) {
40	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g
41	return s.replace(rtrim, "");
42}
43
44function checkFields() {
45
46	missinginfo = "";
47	fname_red = "";
48	email_red = "";
49	how_found = "";
50	phone = "";
51
52	if (trim(document.form.Full_Name_ask.value) == "" || trim(document.form.Full_Name_ask.value) == 'Full Name *') {
53		missinginfo += "\n     -  Full Name";
54		var fname_red = "1px solid red";
55	}
56
57	if (trim(document.form.Email_ask.value) == "" || trim(document.form.Email_ask.value) == 'Email *') {
58		missinginfo += "\n     -  Email";
59		var email_red = "1px solid red";
60	}
61	else if (echeck(document.form.Email_ask.value) == false) {
62		missinginfo += "\n     -  Invalid E-mail ID";
63		var email_red = "1px solid red";
64	}
65	if (trim(document.form.Telephone.value) == "") {
66		missinginfo += "\n     -  Phone Number";
67		var phone = "1px solid red";
68	}
69	else if (isNaN(document.form.Telephone.value)) {
70		missinginfo += "\n     -  Invalid Phone Number";
71		var phone = "1px solid red";
72	}
73
74	if(trim(document.form.treatment.value) == "") {
75	    missinginfo += "\n     -  Treatment";
76	    var treatment_red = "1px solid red";
77	}
78
79	// if(trim(document.form.How_Found_ask.value) == "" || trim(document.form.How_Found_ask.value)=='How did you find us? *') {
80	// 	missinginfo += "\n     -  How did you find us?";
81	// 	var how_found = "1px solid red";
82	// }
83	if (document.form.consent_confirmed.checked == "") {
84		missinginfo += "\n     -  I consent to my personal data being collected and stored as per the Privacy Policy";
85	}
86
87	if (trim(document.form["g-recaptcha-response"].value) == "") {
88		missinginfo += "\n     -  I'm not a Robot";
89	}
90
91
92	if (missinginfo != "") {
93		missinginfo = "_____________________________\n" +
94			"Please complete the missing required fields:\n" +
95			missinginfo + "\n_____________________________" +
96			"\nPlease re-enter and submit again!";
97		alert(missinginfo);
98		document.getElementById('Full_Name_ask').style.border = fname_red;
99		document.getElementById('Email_ask').style.border = email_red;
100
101		document.form.Telephone.style.border = phone;
102		document.getElementById('Type_of_treatment_that_you_are_interested_in_ask').style.border = treatment_red;
103		// document.getElementById('How_Found_ask').style.border = how_found;
104		document.getElementById('Privacy_Policy_ask').required = true;
105
106		return false;
107	}
108	else {
109		document.getElementById('Page_title_ask').value = document.title;
110		document.getElementById('Hostname_ask').value = location.hostname;
111		return true;
112	}
113}

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.