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

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

  • 2 replies
  • 1 has this problem
  • 1 view
  • Paskiausią atsakymą parašė 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.