This commit is contained in:
Skylar Grant 2024-09-12 15:45:32 -04:00
parent 4d17f80c00
commit 1d49e9cff4

View File

@ -134,7 +134,6 @@
})
.then(response => {
if (response.ok) {
loadPDF();
return response.text(); // or .json() if your server returns JSON
} else {
throw new Error('Failed to send print request');
@ -158,6 +157,7 @@
})
.then(message => alert(message))
.catch(error => alert('Error: ' + error));
setTimeout(loadPDF, 1500);
});
document.getElementById('printForm').addEventListener('submit', (event) => {
@ -181,7 +181,6 @@
})
.then(response => {
if (response.ok) {
loadPDF();
return response.text(); // or .json() if your server returns JSON
} else {
throw new Error('Failed to send print request');
@ -189,6 +188,7 @@
})
.then(message => alert(message))
.catch(error => alert('Error: ' + error));
setTimeout(loadPDF, 1500);
});
document.getElementById('printTempPw').addEventListener('click', (event) => {
@ -206,7 +206,6 @@
})
.then(response => {
if (response.ok) {
loadPDF();
return response.text(); // or .json() if your server returns JSON
} else {
throw new Error('Failed to send print request');
@ -214,6 +213,7 @@
})
.then(message => alert(message))
.catch(error => alert('Error: ' + error));
setTimeout(loadPDF, 1500);
});
</script>
</body>