vxcvcxvcxxcv
This commit is contained in:
parent
2db66c6149
commit
cbaed361b4
13 changed files with 16 additions and 23 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue