version 1.22, 2024/03/28 19:04:03 |
version 1.31, 2024/03/28 19:50:37 |
Line 13 function validateMsg(msg) { |
|
Line 13 function validateMsg(msg) { |
|
return (msg.length>5); |
return (msg.length>5); |
} |
} |
|
|
async function postData() { |
//async function postData() { |
const formData = new FormData(form); |
// const formData = new FormData(form); |
try { |
// try { |
const response = await fetch("/feedbk/", { |
// const response = await fetch("/feedbk/", { |
method: "POST", |
// method: "POST", |
body: formData, |
// body: formData, |
}); |
// }); |
console.log(await response.json()); |
// console.log(await response.json()); |
} catch (e) { |
// } catch (e) { |
console.error(e); |
// console.error(e); |
} |
// } |
} |
//} |
|
|
async function sendData() { |
async function sendData() { |
var er = 0; |
var er = 0; |
Line 49 async function sendData() { |
|
Line 49 async function sendData() { |
|
turnstile.render('#cfcontainer', { |
turnstile.render('#cfcontainer', { |
theme: 'light', |
theme: 'light', |
sitekey: '0x4AAAAAAAVpXFEy152AON1L', |
sitekey: '0x4AAAAAAAVpXFEy152AON1L', |
|
'response-field': false, |
|
retry: 'never', |
'error-callback': function(e) { |
'error-callback': function(e) { |
turnstile.remove(); |
turnstile.remove(); |
}, |
}, |
callback: function(token) { |
callback: function(token) { |
ii.textContent="Sent"; |
ii.textContent="Sent"; |
console.log(`Challenge Success ${token}`); |
console.log(`Challenge Success ${token}`); |
postData(); |
// postData(); |
|
var data="", |
|
status=""; |
|
$.post("/feedbk/", token, function(data, status){ |
|
console.log("Data: " + data + "\nStatus: " + status); |
|
}); |
|
|
|
|
|
|
}, |
}, |
}); |
}); |
}); |
}); |