version 1.89, 2024/03/31 16:22:00 |
version 1.96, 2024/03/31 16:52:11 |
Line 45 async function sendData() { |
|
Line 45 async function sendData() { |
|
} else { |
} else { |
var fcon = document.querySelectorAll(".wpcf7-form-control"); |
var fcon = document.querySelectorAll(".wpcf7-form-control"); |
|
|
info.textContent="Please wait..." |
info.textContent="Verifying..." |
fcon.forEach((f) => { |
fcon.forEach((f) => { |
f.disabled=true; |
f.disabled=true; |
l=f; |
l=f; |
Line 58 async function sendData() { |
|
Line 58 async function sendData() { |
|
'response-field': false, |
'response-field': false, |
sitekey: '0x4AAAAAAAVpXFEy152AON1L', |
sitekey: '0x4AAAAAAAVpXFEy152AON1L', |
'error-callback': function(e) { |
'error-callback': function(e) { |
info.textContent="Cloudflare Turnstile verification error. Try again later." |
info.textContent="Verification error. Try again later."; |
|
turnstile.remove(); |
}, |
}, |
callback: function(token) { |
callback: function(token) { |
const data = JSON.stringify({"add": mail, "sub": subj, "msg": mess, "tok": token}); |
const data = JSON.stringify({"add": mail, "sub": subj, "msg": mess, "tok": token}); |
|
turnstile.remove(); |
info.textContent="Sending..."; |
info.textContent="Sending..."; |
fetch("/feedbk/", { |
console.log(data); |
headers: { "Content-Type": "application/json" }, |
// fetch("/feedbk/", { |
credentials: "same-origin", |
// headers: { "Content-Type": "application/json" }, |
mode: "same-origin", |
// credentials: "same-origin", |
method: "post", |
// mode: "same-origin", |
body: data |
// method: "post", |
}) |
// body: data |
.then(response => response.json()) |
// }) |
.then(json => info.textContent=json['msg']) |
// .then(response => response.json()) |
|
// .then(json => info.textContent=json['msg']) |
|
|
} |
} |
}); |
}); |
}); |
}); |
turnstile.remove(); |
|
}; |
}; |
} |
} |
|
|