I have a form passing the data by GET to an API, the method I put empty to load on the same page, when I get the data I put inside a div to display them, but I need to do this without refreshing the page , I need to just load the did with the data, I do not have the Jquery morning.
I did this
jQuery(document).ready(function () {
jQuery('#ajax_form').submit(function () {
var dados = jQuery(this).serialize();
jQuery.ajax({
type: "GET",
url: "index.php",
data: dados,
success: function (data)
{
alert('deu certo');
}
});
return false;
});
});
But I need the data to return to a table, not an alert.