diff --git a/mccs-it/thermal/public/index.html b/mccs-it/thermal/public/index.html index 37fb7c4..a65ef26 100644 --- a/mccs-it/thermal/public/index.html +++ b/mccs-it/thermal/public/index.html @@ -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); });