PageSourceSearch

https://www.graceleedydentistry.com/wp-content/uploads/2025/05/contactv1_migrated.js

js graceleedydentistry.com collected 2026-10-04 16:08:04 UTC 5,364 bytes, 182 lines download raw bytes

1//var validateContactCaptcha = function (response) {
2//    $('#contact-form').find('input[name="recaptcha"]').val(response);
3//};
4var clientEncrptKey = null;
5$("#name").on("keyup", function () {
6  var re = $("#name").val();
7  if (re == "") {
8    $("#errorsAll").css("display", "inline-block");
9  } else {
10    $("#errorsAll").css("display", "none");
11  }
12});
13$("#emailId").on("keyup", function () {
14  var re = $("emailId").val();
15  if (re == "") {
16    $("#errorsAll").css("display", "inline-block");
17  } else {
18    $("#errorsAll").css("display", "none");
19  }
20});
21$("#drlocation").on("change", function () {
22  var re = $("#drlocation").val();
23  if (re == "Select Location") {
24    $("#errorsAll").css("display", "inline-block");
25  } else {
26    $("#errorsAll").css("display", "none");
27  }
28});
29$("#phone").on("keyup", function () {
30  var re = $("#phone").val();
31  if (re == "") {
32    $("#errorsAll").css("display", "inline-block");
33  } else {
34    $("#errorsAll").css("display", "none");
35  }
36});
37$("#comment").on("keyup", function () {
38  var re = $("#phone").val();
39  if (re == "") {
40    $("#errorsAll").css("display", "inline-block");
41  } else {
42    $("#errorsAll").css("display", "none");
43  }
44});
45$("#privacy").on("click", function () {
46  if ($(this).is(":checked") == true) {
47    $("#errorsAll").css("display", "none");
48  } else {
49    $("#errorsAll").css("display", "inline-block");
50  }
51});
52
53$("#submitContact").click(async function (e) {
54  e.preventDefault();
55  $("#contact-form")
56    .validate({
57      rules: {
58        name: {
59          required: true,
60        },
61        email: {
62          email: true,
63          required: true,
64        },
65        phone: {
66          required: true,
67          //                    number: true,
68          //                    maxlength: 10,
69          //                    minlength:10
70        },
71        message: {
72          required: true,
73        },
74      },
75      messages: {
76        name: { required: "Please enter your name" },
77        email: { required: "Please enter your email address" },
78        phone: {
79          required: "Please enter your phone number",
80          //                    maxlength: jQuery.validator.format("Please enter {0} digits."),
81          //                    minlength: jQuery.validator.format("Please enter {0} digits.")
82        },
83        message: "Please enter your message",
84      },
85      focusCleanup: true,
86      onfocusout: function (element) {
87        $(element).valid();
88      },
89      tooltip_options: {
90        name: { placement: "bottom" },
91        email: { placement: "bottom" },
92        phone: { placement: "bottom" },
93        message: { placement: "bottom" },
94      },
95    })
96    .form();
97
98  var name = $("#name").val();
99  var email = $("#emailId").val();
100  var contact_number = $("#phone").val();
101  var message = $("#comment").val();
102  var location = $("#drlocation").val("");
103  var location_id = $("#location_dropdown").val();
104  var subject = "";
105  if ("#subject".length) {
106    subject = $("#subject").val();
107  }
108  var recaptcha = $("#contact-form").find('input[name="recaptcha"]').val();
109
110  var contact_form = $("#contact-form");
111  contact_form.validate();
112  if (
113    name == "" ||
114    email == "" ||
115    contact_number == "" ||
116    message == "" ||
117    location == "" ||
118    $("#privacy").is(":checked") == false ||
119    recaptcha == "" ||
120    contact_form.valid() == false
121  ) {
122    $("#errorsAll").css("display", "inline-block");
123  } else {
124    var data = {
125      name: name,
126      email: email,
127      contact_number: contact_number,
128      message: message,
129      subject: subject,
130      g_recaptcha_response: recaptcha,
131      location_id: location_id,
132    };
133    try {
134      if (clientEncKey) clientEncrptKey = clientEncKey;
135    } catch (e) {
136      console.log("clientEnc not found");
137    }
138    try {
139      if (clientEncrptKey) {
140        data = {
141          ...data,
142          name: encryptClientData(data.name),
143          email: encryptClientData(data.email),
144          contact_number: encryptClientData(data.contact_number),
145        };
146      }
147
148      $.ajax({
149        dataType: "json",
150        type: "POST",
151        url: GP_WEBSITES_API_URL + "/api/website/contacts/",
152        headers: { "GP-Host": window.location.hostname },
153        data: data,
154        success: function () {
155          if (contact_success_redirect.length > 1) {
156            window.location = website_url + contact_success_redirect;
157          } else if ($("#success-popup").length > 0) {
158            $("p.dynamic-text").text(contact_popup_success_text);
159            $("#success-popup").modal("show");
160          } else {
161            $("#success-contact").modal("show");
162          }
163          // $("#success-contact").modal("show");
164          $("#contact-form")[0].reset();
165          $("#reviewModal").modal("hide");
166          $("#name").val("");
167          $("#emailId").val("");
168          $("#phone").val("");
169          $("#comment").val("");
170          $("#drlocation").val("");
171          $("#privacy").prop("checked", false);
172          resetContactCaptcha();
173        },
174        error: function () {
175          $("#error-contact").modal("show");
176        },
177      });
178    } catch (e) {
179      console.log(e);
180    }
181  }
182});

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.