I have a division html as
<div id="download-progress"></div>
I want to show progress of my file upload in it with a js function progress(), which runs on Click. I have used following form for the file upload.
<form id="myform" name="myform" enctype="multipart/form-data" target="hiddenFrame" method="post">
These files may be coming in zip format which I unzip, then read metadata and then append them to a list. It gets nodes by tag name to append to the data. I simply want a progress bar which tell me how much % of files have been uploaded. I can give you more information if you ask for. Currently I tried using following code for the same but It did not provided me upload percentage on my file upload in IE11.
function progress() {
var elem = document.getElementById("myBar");
var width = 10;
var id = setInterval(frame, 10);
function frame() {
if (width >= 100) {
clearInterval(id);
} else {
width++;
elem.style.width = width + '%';
elem.innerHTML = width * 1 + '%';
}
}
}
How can I show file uploads in all modern browsers?