How can I see all the results of an Ajax jquery answer?

advertisements

I am trying to make an Ajax call with jquery, if I put an alert in the success part, it launches the alert, so I know the call is working and there is no errors but if I try to u a value returned from the Ajax call it is null, I would post code but I'm on an iPhone.

How can I basicly see all the results returned? Basicly what php's print_r($bar) does


Another option (aside from Cody's) is to add a handler for the global ajaxSuccess event. When jQuery calls the handler, it passes it the XMLHTTPRequest instance, so you can access the responseText property directly:

$(document).ajaxSuccess(function(xhr, settings) {
    alert(xhr.responseText); // Should print the raw response from the server
});