Page 1 of 1

Get success respose in ajaxSuccess?

Posted: Sat Aug 08, 2009 11:19 pm
by cohq82
I am using $.ajax in jQuery and I have some thing running in $().ajaxSuccess(function(event, request, settings) {});

However I don't know how to get the html as in response of the success callback below:

success: function(html) {});

How to pass html over to ajaxSuccess?

I know I can insert a line to assign html var to another global variable but is there a different way?
Thanks.

Re: Get success respose in ajaxSuccess?

Posted: Sun Aug 09, 2009 7:00 am
by kaszu
Request object has reponseText property

Code: Select all

$().ajaxSuccess(function(event, request, settings) {
    alert(request.responseText);
});