How to send a form with blank targe and redirect the current page without the crhome block?

0

I have the following scenario:

In a form I send the data via Ajax, at the time of the return if:

if (json.retorno == true){
  $("#form_imprime").submit();
}

If I put a button on form and send via the click of this button it opens another window and the browser does not complain, but if I try to send via ajax it blocks saying it's popup, then it will only open if the guy releases the popup.

It turns out not quite a popup is a new page so much so that by the button it goes.

I know that this popup blocking of browsers is normal, but is there a solution in this case, without the user having to intervene?

I have this need because the users that will use the system has no experience and to unblock the popup will be a delivery for them.

In summary I need the following:

0 - O usuario seleciona um horario e é enviado para outra pagina
1 - Nessa outra pagina esta o formulario entao gravar os dados do formulario (via ajax)
2 - Abrir um tela de impressão com os dados gravados
3 - Redirecionar a pagina do formulario para uma pagina anterior

I already have this system working in an old way, but it is well obsolete, I am changing to ajax and I found this difficulty.

    
asked by anonymous 20.09.2018 / 23:54

0 answers