prevent alert if nothing is returned on modal form sent.

This commit is contained in:
2026-02-14 20:36:43 +01:00
parent 851147ee2e
commit dde744ba7c
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -399,7 +399,9 @@ function switchFloor(floor){
xmlhttp.onreadystatechange = function () {
if (this.readyState === 4 && this.status === 200){
setTimeout(function () { modalEV.hide() }, 700);
alert(xmlhttp.responseText);
if(xmlhttp.responseText){
alert(xmlhttp.responseText);
}
}
}
const form = document.getElementById('modalEV').querySelector('form');