show loading dialog for multiple ajax request
I am making two ajax call asynchronously, on each call I am showing a
loading dialog box like this,
jQuery('#msg_writter').show();
on success of each request I will hide the loading dialog like this,
jQuery('#msg_writter').fadeOut(1000);
my html code for loading dialog:
<div id="msg_writter" class="msgWritter">
<img src="/images/loading.gif"/>
</div>
when the first request is done, the loading dialog gets disappear so
loading dialog is not showing for the second request.
How could I modify the code to show the loading dialog from the first
request till the success of last request.
No comments:
Post a Comment