I'm calling the following function inside the page:
window.onload = function() {
acess();
}
function acess() {
decision = confirm("Deseja realmente excluir o servidor cadastrado abaixo?");
if (decision) {
window.location.replace("fin.del.cad.php");
} else {
history.back();
}
}
However, the Confirm appears and the page is left blank loading infinitely until I click on it.
I would like the Confirm and / or alert after page loading and not before. I tried some options that I saw in other forums and did not work very well.