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.
Get success respose in ajaxSuccess?
Moderator: General Moderators
Re: Get success respose in ajaxSuccess?
Request object has reponseText property
Code: Select all
$().ajaxSuccess(function(event, request, settings) {
alert(request.responseText);
});