“Changes you made may not be saved.”.
- window.addEventListener('beforeunload', (event) => {
if (window.performance.getEntriesByType("navigation")){
<?php
if (isset($_SESSION['varOperator']) | isset($_SESSION['varPassword']) | isset($_SESSION['varUserLevel']) | isset($_SESSION['varExtension'])) {
?>
if (document.getElementById('can_logout').value == "No") {
alert(document.location.href)
event.preventDefault();
event.returnValue = '';
}
else {
alert("qqq");
}
<?php
}
else {
alert("hhh");
}
?>
}
delete event['returnValue'];
alert("ggg");
})
How do I remove the very annoying “Changes you made may not be saved.”. popup please or is there another way I can do the check without using beforunload as I can't think of one?