$.ajax({
url: 'executa.php',
type: 'POST',
data: {emailDestino: emailDestino},
dataType: 'html',
success: function(data) {
$('#notifyInscrito').appendTo(data);
}
});
I'm going there in the executa.php
file via ajax with an email, and doing a query to mount an HTML with the returned data, and I want to put that complete HTML inside div
#notifyInscrito
. That is a lightbox that will immediately send an email to the record of the returned data.
I tried to make a $('#notifyInscrito').appendTo(data)
in the intention of returning the form from within executa.php
and inserting within div
but did not work.
Question: How do I get the HTML of executa.php
and put within div
#notifyInscrito
?