Skip to content Skip to sidebar Skip to footer

How To Capture Asynchronous Ajax Response Into A Variable?

I am making the following jquery ajax call to a codeigniter php function: var html =''; $.ajax({ type:'POST', url: 'Ajax/ge

Solution 1:

I'm afraid it is not possible.

If you want to do something with the html data returned from the ajax, you should do it inside the success function, or call another function that does the job with the retured value.


Solution 2:

i think u should try data.responseText();


Post a Comment for "How To Capture Asynchronous Ajax Response Into A Variable?"