I'm having trouble opening a new tab after a confirm
and windows.open
, follow the code:
function dec(){
var matricula = "<?php echo $matricula;?>";
var receita = "<?php echo $receita;?>";
decisao = confirm("Matricula: "+matricula+"\nReceita: "+receita+"\nReceita cadastrada com sucesso!"+"\n\n"+"Deseja imprimi-la?");
if (decisao)
window.open('imprimir_receitas.php?matricula='+matricula+'&receita='+receita, 'blank');
}
After clicking ok, the pop-up is blocked, is there any way to open this tab without being blocked?