vxcvcxvcxxcv

This commit is contained in:
Aevann1 2022-01-21 19:25:46 +02:00
parent 2db66c6149
commit cbaed361b4
13 changed files with 16 additions and 23 deletions

View file

@ -1,6 +1,4 @@
function post_toast2(url, button1, button2) {
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
const xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
xhr.setRequestHeader('xhr', 'xhr');
@ -29,6 +27,7 @@ function post_toast2(url, button1, button2) {
document.getElementById(button2).classList.toggle("d-none");
} else {
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
new bootstrap.Toast(document.getElementById('toast-post-error')).show();
}