I'm giving window.print();
to print my page, right after it I send window.location
to redirect the page, the problem is that the page is redirected to the print command. I need to make the redirect work only when the user prints or cancels printing.
Can anyone help me? Here is my code:
$(document).ready(function () {
// Remove o loading
$(".se-pre-con").hide();
// Remove Menu topo
$(".header").hide();
$('.content').css({
top: ("0px")
}).show();
// Imprime a página
window.print();
// Redireciona página
window.location = 'Logado.php?pagina=<?= $pagina_crypt ?>';
});