Here I have pasted my code, I want to return the response of $.ajax as response of function a(). But before the result comes up of ajax call, it is returning the empty f. pl
I guess you are using jQuery 1.8+
http://api.jquery.com/jQuery.ajax/
Please read the fine print.
As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the complete/success/error callbacks.
As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated;
you must use the complete/success/error callbacks.
try
http://jsfiddle.net/UgrLE/