=================================================================== RCS file: /cvs/cvs/draft/form.min.js,v retrieving revision 1.96 retrieving revision 1.99 diff -u -p -r1.96 -r1.99 --- draft/form.min.js 2024/03/31 16:52:11 1.96 +++ draft/form.min.js 2024/04/01 19:04:36 1.99 @@ -63,19 +63,18 @@ async function sendData() { }, callback: function(token) { const data = JSON.stringify({"add": mail, "sub": subj, "msg": mess, "tok": token}); - turnstile.remove(); info.textContent="Sending..."; - console.log(data); -// fetch("/feedbk/", { -// headers: { "Content-Type": "application/json" }, -// credentials: "same-origin", -// mode: "same-origin", -// method: "post", -// body: data -// }) -// .then(response => response.json()) -// .then(json => info.textContent=json['msg']) - +// console.log(data); + fetch("/feedbk/", { + headers: { "Content-Type": "application/json" }, + credentials: "same-origin", + mode: "same-origin", + method: "post", + body: data + }) + .then(response => response.json()) + .then(json => info.textContent=parseString(json['msg'])) + .then(turnstile.remove()); } }); });