How can I, if I can, open a new page after returning a query in php
, what I have today is this:
$(function () {
$("#frmConsulta").validate({
submitHandler: function (form) {
var data = $(form).serialize();
console.log(data);
$.ajax({
type: 'POST',
url: 'ajax/pRelatorioEvolucaoSafra.php',
data: data,
dataType: 'html',
success: function (response) {
// EXIBINDO O RETORNO DAS INFORMAÇÕES
$("#msgRelatorio").html(response);
$('#frmConsulta').each(function () {
this.reset();
});
},
error: function (xhr, ajaxOptions, thrownError) {
console.log(xhr, ajaxOptions, thrownError);
$("#msgRelatorio").html('<div class="alert alert-danger fade in"><button class="close" data-dismiss="alert">×</button><i class="fa-fw fa fa-times"></i><strong>ATENÇÃO!</strong> Ocorreu um erro ao tentar efetuar a consulta. Contate o suporte técnico.</div>');
}
});
return false;
}
});
});
In return, I'm placing a table in the% div, but I need to open it in a new page.