// Update progress bar xhr.upload.addEventListener("progress", uploadProgress, false); function uploadProgress(evt) { if (evt.lengthComputable) { var percentComplete = Math.round(evt.loaded * 100 / evt.total); prognumber.innerHTML = percentComplete + '%'; //assign value to prgress bar Div var progressBar = document.getElementById("progressBar"); progressBar.max = evt.total; progressBar.value = evt.loaded; } } // File load event xhr.upload.addEventListener("load", loadSuccess, false); function loadSuccess(evt) { prognumber.innerHTML += "Upload"; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)