When set of JQuery AJAX calls are executing synchronously I would like to show a message which AJAX call is curring executing, so that user can wait till all the calls executed.
What I tried is using the JQuery,
LoadAllData();
function LoadAllData()
{
$('#spMsg').text('Wait, fetching data1...);
ajaxCallForData1();
$('#spMsg').text('Wait, fetching data2...);
ajaxCallForData2();
$('#spMsg').text('Wait, fetching data3...);
ajaxCallForData3();
}
But the issue is $('#spMsg') is not updating unless all the AJAX calls are executed.
I have tried the JQuery Block UI plug in, but works good for single ajax call but not for sequence of calls in a function. What is the best way to fix this?