I’m calling an ajax page using $.post.
$.post("ajaxpage.php", $("#theform").serialize());
How can I echo the response that the page returned? I tried saving to a var, but it’s not giving me the response.
var resp = $.post("ajaxpage.php", $("#theform").serialize());
console.log(resp);
1 Answer