php - Displaying progress bar upto response occur using jquery ajax submission -


i send request php page using jquery ajax concept, have display response in dialog box. works fine problem takes time response. can add progress bar it.

$.ajax({             type: "post",             url: "push/push_notify.php",             data: "pushmessage="+message+"&iphone="+iphone+"&android="+android+"&blackberry="+blackberry,             success: function(e){                 var response = e;                 apprise(response, {'animate':true});             }         });        return false; 

you show spinner image before running request , hide after request finishes, complete handler. example:

$('#spinner').show(); $.ajax({     type: "post",     url: "push/push_notify.php",     complete: function() {         $('#spinner').hide();     },     data: {          pushmessage: message,          iphone: iphone,          android: android,          blackberry: blackberry     },     success: function(e) {         var response = e;         apprise(response, {'animate':true});     } }); 

and here's site some ajax spinners.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -