Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.

When uploading a file the progress shows complete before the file has been uploaded, how can I solve this? Works 100% in Chrome

  • 2 uphendule
  • 1 inale nkinga
  • 15 views
  • Igcine ukuphendulwa ngu Shadow110

more options

I'm using Ajax for progress bar. The progressbar is showing complete before the file has completely uploaded. It works 100% in Chrome. The code to show progress is as follows:

function progressHandler(event,object) {

                                                                          percentcomplete = Math.round((event.loaded / event.total) * 100);

// This takes the value form the progress bar and gives the new value

                                                                          $(".progressbar")..val (Math.round(percentcomplete));
                                                                          $(".percentupload").text(percentcomplete + "%");
                                                                          ajax.progress = function() {
                                                                                                                               console.log('LOADING', ajax.status);
                                                                           };
                                                                           ajax.load = function (){
                                                                                                                       console.log('DONE', ajax.status);
                                                                           };
}
I'm using Ajax for progress bar. The progressbar is showing complete before the file has completely uploaded. It works 100% in Chrome. The code to show progress is as follows: function progressHandler(event,object) { percentcomplete = Math.round((event.loaded / event.total) * 100); // This takes the value form the progress bar and gives the new value $(".progressbar")..val (Math.round(percentcomplete)); $(".percentupload").text(percentcomplete + "%"); ajax.progress = function() { console.log('LOADING', ajax.status); }; ajax.load = function (){ console.log('DONE', ajax.status); }; }

All Replies (2)

more options

Ajax isn't a FF software so we can't help there. You should only use the browser progress status unless there is a specific issue your trying to resolve.

more options

Please further explain what you are doing, how you are using it and why. You have not provided enough information other than to get the above.