1
I know this is a strange question, and it may seem pointless, but I need an answer, even if it’s for impossível.
I do a search in my indexand need to pass the result in the same to another page positioning in a div.
I did some research and tried some alternatives, but without success and as I said, I don’t even know if that’s possible.
What I already have is this, the return of a research, I consult response and already visualise the content desired.
$(function() {
$("#frmBusca").validate({
submitHandler: function(form) {
var data = $(form).serialize();
$.ajax({
type: 'POST',
url: 'pBuscaGenerica.php',
data: data,
dataType: 'html',
success: function(response) {
window.location.replace("outra_pag.php");
// EXIBINDO O RETORNO DAS INFORMAÇÕES
$("#msgRamais").html(response);
// RESETANDO A FUNÇÃO
_toggle();
},
error: function(xhr, ajaxOptions, thrownError) {
console.log(xhr, ajaxOptions, thrownError);
$("#msgRamais").html('×ATENÇÃO! Ocorreu um erro ao tentar obter o ramal. Contate o suporte técnico.');
}
});
return false;
}
});
});
I need to redirect to a particular div, I will not post the attempts because they were unproductive and would not add anything to the post.
Want to put the result (Replay) inside a div of another page? That’s it?
– Miguel
Hello @Miguel, just that.
– adventistapr
Not yet? I see that you have updated the code... So I see you want to redirect to another page when you receive the answer?
– Miguel
Hello @Miguel, what I need is a little complex, I need to move Replay to the next page and show it in a div, but I don’t know if this is possible.
– adventistapr
Of course it is, follow the steps of my reply. Also read the notes. Want to redirect to the other pag in the ajax function succeso?
– Miguel
redirect and pass the content of 'Answer'.
– adventistapr
Edited answer. I think that’s it... Read it carefully
– Miguel