Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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

  • 2 답장
  • 1 이 문제를 만남
  • 1 보기
  • 최종 답변자: 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); }; }

모든 댓글 (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.