I am using a simple ajax loader to get content on wordpress.
$("#page_preview").load("ajaxloader/", function(response, status, xhr) {
if (status == "error") {
alert("Sorry but there was an error");
}
else
{
$('#page_preview').fadeIn(300);
}
});
return;
When I load a specific post that has a google map embedded, obviously something goes wrong BUT instead of going inside the if
statement, the firebug shows that it goes beyond this code. Neither if
or else
hit.
Using the eclipse debugger I found that the page load successfully, but when it returns the data to the .load()
method, the last breaks.
Any ideas on what might going on?
console.log
oralert
theresponse
? – Traditionalert(status);
ahead of yourif
statement? – Rembert