Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
In my application i am showing HTML file upload progress event with %(percentage)...
Now I want to show its like 20KB/100KB...(Uploading Size)/(Total Size)...
In progress event what should i have to do..This is my now code...what should i have to change which will show such format in span ..
  // Update progress bar
xhr.upload.addEventListener("progress", uploadProgress, false);

function uploadProgress(evt) {

   if (evt.lengthComputable) {
      var percentComplete = Math.round(evt.loaded * 100 / evt.total);
				                  
      //for my progrss bar

      $(fileParentDivobj).find("progress").attr('value',evt.loaded);
      $(fileParentDivobj).find("progress").attr('max',evt.total);
      $(fileParentDivobj).find(".ImgDiv").find("span").html(percentComplete + '%');
   }
}//upload progress
Posted
Updated 14-Dec-11 19:01pm
v2

1 solution

Dear Mika,

Please refer to this link for your problem:-

ASP.NET File Upload with Progress Bar[^]
 
Share this answer
 
Comments
Dalek Dave 23-Dec-11 14:43pm    
Good Link.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900