=================================================================== RCS file: /cvs/cvs/draft/form.min.js,v retrieving revision 1.91 retrieving revision 1.99 diff -u -p -r1.91 -r1.99 --- draft/form.min.js 2024/03/31 16:26:26 1.91 +++ draft/form.min.js 2024/04/01 19:04:36 1.99 @@ -45,7 +45,7 @@ async function sendData() { } else { var fcon = document.querySelectorAll(".wpcf7-form-control"); - info.textContent="Please wait..." + info.textContent="Verifying..." fcon.forEach((f) => { f.disabled=true; l=f; @@ -58,12 +58,13 @@ async function sendData() { 'response-field': false, sitekey: '0x4AAAAAAAVpXFEy152AON1L', '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) { const data = JSON.stringify({"add": mail, "sub": subj, "msg": mess, "tok": token}); info.textContent="Sending..."; +// console.log(data); fetch("/feedbk/", { headers: { "Content-Type": "application/json" }, credentials: "same-origin", @@ -72,10 +73,10 @@ async function sendData() { body: data }) .then(response => response.json()) - .then(json => info.textContent=json['msg']) + .then(json => info.textContent=parseString(json['msg'])) + .then(turnstile.remove()); } }); - turnstile.remove(); }); }; }