My current code is :
var dataReceiveString = $.ajax({ url: "getDataReceiveString.php?"+param, dataType: "text", async: false }).responseText; // code that make use of dataReceiveString ; The obvious choice of changing false to true does not work.
How should the code be rearranged ?
Also to add a waiting circle gif animation while javascript do ajax call to php.
edit : question is different from Execute function after Ajax call is complete as avoiding use of async:false.
edit : question is different from How do I return the response from an asynchronous call? as it's too generic and not targetted to my question.
success: function(data) { /* Do something with your response data */ }afterasync: false,