tags:

views:

58

answers:

2

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

+3  A: 

Use FireBug for Firefox or Stumbler for Internet Exporer.

Cody Caughlan
+1 for Firebug :)
elo80ka
I have it but it doesn't show anything useful at all just the sourcode, is there a trick to using it?
jasondavis
turn on the console for your domain
nickf
redsquare
+1  A: 

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
});
elo80ka
Thanks I'll try this too
jasondavis