PageSourceSearch

https://duztec.in/assets/js/ajax-mail.js

js duztec.in collected 2026-10-04 03:15:19 UTC 1,353 bytes, 41 lines download raw bytes

1window.addEventListener("DOMContentLoaded", function () {
2  // get the form elements defined in your form HTML above
3
4  var form = document.getElementById("dreamit-form");
5  // var button = document.getElementById("my-form-button");
6  var status = document.getElementById("status");
7
8  // Success and Error functions for after the form is submitted
9
10  function success() {
11    form.reset();
12    status.classList.add("success");
13    status.innerHTML = "Thank you message sent.!";
14  }
15
16  function error() {
17    status.classList.add("error");
18    status.innerHTML = "Oops! There was a problem.";
19  }
20  // handle the form submission event
21  // form.addEventListener("submit",function (ev){
22  //   ev.preventDefault();
23  //   var data = new FormData(form);
24  //   ajax(form.method, form.action, data, success, error);
25  // });
26});
27// helper function for sending an AJAX request
28function ajax(method, url, data, success, error) {
29  var xhr = new XMLHttpRequest();
30  xhr.open(method, url);
31  xhr.setRequestHeader("Accept", "application/json");
32  xhr.onreadystatechange = function () {
33    if (xhr.readyState !== XMLHttpRequest.DONE) return;
34    if (xhr.status === 200) {
35      success(xhr.response, xhr.responseType);
36    } else {
37      error(xhr.status, xhr.response, xhr.responseType);
38    }
39  };
40  xhr.send(data);
41}

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.