showing results for - "how to show progress on ajax call"
Corinne
12 Jan 2017
1$.ajax({
2    xhr: function() {
3        var xhr = new window.XMLHttpRequest();
4
5        // Upload progress
6        xhr.upload.addEventListener("progress", function(evt){
7            if (evt.lengthComputable) {
8                var percentComplete = evt.loaded / evt.total;
9                //Do something with upload progress
10                console.log(percentComplete);
11            }
12       }, false);
13
14       // Download progress
15       xhr.addEventListener("progress", function(evt){
16           if (evt.lengthComputable) {
17               var percentComplete = evt.loaded / evt.total;
18               // Do something with download progress
19               console.log(percentComplete);
20           }
21       }, false);
22
23       return xhr;
24    },
25    type: 'POST',
26    url: "/",
27    data: {},
28    success: function(data){
29        // Do something success-ish
30    }
31});
Maria
18 Nov 2020
1BY LOVE
2You need to call the progress bar class, That's IT
3
4beforeSend: function () 
5				{
6                    $('.loaderimg').show();
7                },
8complete: function () 
9				{
10                    $(".loaderimg").hide();
11                }
Luca
15 Sep 2019
1$.ajax({
2    url: path,
3    type: 'post',
4    data: {payload: payload},
5    xhr: function () {
6        var xhr = $.ajaxSettings.xhr();
7        xhr.onprogress = function e() {
8            // For downloads
9            if (e.lengthComputable) {
10                console.log(e.loaded / e.total);
11            }
12        };
13        xhr.upload.onprogress = function (e) {
14            // For uploads
15            if (e.lengthComputable) {
16                console.log(e.loaded / e.total);
17            }
18        };
19        return xhr;
20    }
21}).done(function (e) {
22    // Do something
23}).fail(function (e) {
24    // Do something
25});
queries leading to this page
progress ajax requesthow to show progress bar on top in jquery ajaxajax progress bar with percentageajax progress showshow progress bar with 24 ajaxjs call api show process barajax show progress barcreate progress bar in jquery unless response comesajax upload with progressbarajax jquery progressajax post progress barjquery progress bar ajax responseprogress bar javascript ajaxdynamic progress bar using ajaxajax jquery progress bar exampleshow progress for ajaxjquery get ajax progressajax call on progressstatus bar before send ajaxshow something during request progress ajaxprogress bar with ajax requestajax request progressadd progress bar every success ajaxajax javascript progress barxhr response progress barjavascript ajax progresspost jquery in progressajax js onprogress baradding progress bar jquery ajaxajax call in progressshow progress bar percentage until ajax upload is completely doneshow progress bar ajax loading imageget ajax progressprogress bar using ajax beforeloadadd progress bar in jquery requestprogress ajax jqueryjquery show progress bar ajaxfile loading with ajax get request with progress barprogress bar on ajax call 24 ajax progressajax jquery progress barprogress bar ajax request jqueryajax load progress bar jquerydownload progress bar with ajax requesthow to show progress bar with percentage on ajax requestprogress bar load ajaxhow to get the progress of ajax jqueryusing web progressbar as an ajax progress indicatorusing progressbar as an ajax progress indicatorjquery ajax request progress barget ajax request 25 progresshtml progress with ajaxusing ajax progress for progress barload progress bar page by percentage ajaxjquery ajax progress bar with percentageshowing progress bar on ajax call with server response time using jquery ajax progress bar while requestajax call progress barjquery ajax button progress till data loadprogress bar in javascript ajaxajax post method progress bar until process completedjquery ajax on progressajax calculate progressajax in progressajax progress jqueryshow progress bar without ajaxjquery xhrfields process progress phphow to show progress bar js ajaxhow to apply loading progress with out ajax ccalljs ajax progresshow to use progressbar bars with ajaxajax progressshow ajax progressprogress bar jquery ajax exampleprogress bar using jquery ajaxbefore send ajax progress barprogress bar steps for ajax request jqueryprogress ajax and show status libraryjquery ajax response progress barajax response progress barhtml progress ajaxhow to create progress bar in ajaxget ajax request progressprogressbar jquery 3 ajaxadding ajax progress barcreating a progress bar in ajaxjquery progress bar ajax loaderprogress bar before send ajaxajax show progressloading bar ajaxajax get progressruntime progress bar percentage on ajax call using jqueryajax progress bar with percentage in get requestjquery ajax real time progress barhow to show a message in progress bar ajax callhow to show progress bar value using ajax listeners jqueryhtml js call api show process barlaminus progress bar in ajaxajax progress bar loaderajax after response progress bar completeajax loading barprogress bar preloader jquery ajaxhow to get with progress bar using ajaxprogress bar in jquery ajax call examplejquery ajax progress handlerhow to show progress on ajax calldownload progress bar on ajax requestincrease progress bar value jquery on ajax requestajax popup progress barhow to show request progress in jquery ajaxhow to show progress bar if page is loading ajaxhow to real time progress par till ajax completesprogress request pending to complete bootstrapajax post request progress bar with digitfile progress bar in ajax jqueryjquery ajax progress bar exampledynamic progress bar with ajaxprogress bar jquery ajaxjquery ajax progress bar pluginupdate progress bar ajaxajax get data with progress barhow to do xmlhttprequest progress bar in javascriptjs progress bar in ajaxjavascript ajax progress baruse jquery ajax to make progress barajax update progressjquery progress bar till ajax responsejquery ajax request in progressprogress bar with ajax jqueryjquery ajax send progressprogress ajax show ajaxstart progress barshow progress ajax jquery requestjquery ajax progress barajax with progress barprogressbar ajaxserver response time in progress bar percentage on ajax call using jqueryloading bar when send a request by javascript on loading javascript for api call circule progress barjquery ajax send data in progressshow progress bar while ajax callajax with progressjquery is ajax in progressjquery progress bar ajaxajax loading progressajax progress bar jqueryprogress bar with ajaxjquery progress bar with percentage ajaxajax get progress of postingajax use progress barhow to use progress in ajaxprogress bar js ajaxajax on progress function datareact loading bar while ajax requestprogress bar ajax responsehtml howto create a loading bar with ajax 24 ajax progress start in jqueryprogress indicator for ajax request jshow to real time progress par till ajax completes phploading bar using 24 ajaxhow to stop progress in ajax requesthow to track ajax progress and successhowto add progress bar to ajaxjquery ajax loading barhow to show progress bar when uplaoding files using ajaxjquery ajax progressajax small progress barprogress ajax and show statusajax progress htmljquery ajax show progress barprogress bar on ajax requestajax progress barloadng bar with ajaxprogress bar until ajax success in jsprocess data in server javascript ajax with progress barphp progress bar ajaxprogress bar ajaxjquery ajax progress 28 29ajax javascript onprogress barajax in progress eventget progress in ajax requestjquery ui progress bar ajax exampleajax progressbarhow to track ajax progressajax download progress barloading bar ajax get jqueryjquery ajax get progressajax progress eventajax upload with progress barhow to add progress bar in ajax jqueryaprogress bar using ajaxshow loading bar jquery ajaxsubmitshow progress ajax 3fchange progress bar ajaxajax progress functionhow make progress bar to ajax reqouestjquery progress bar ajax exampleprogress bar when making ajax callhtml run progress bar until certain ajax callajax get data with progress bar exampleprogress bar in ajax jqueryhow to show progress on ajax call