Working Example of the HTML <progress> Tag
<button onClick="runProgress()">Run Progress Bar</button>
<progress value="0" id="downloadProgress" max="50">Progress...</progress>
<span id="message"></span>
<script>
var milisec=0
var max=50
function runProgress(){
if(milisec>=max){
document.getElementById('message').innerHTML="Finished!";
}
milisec+=1;
document.getElementById('downloadProgress').value=milisec;
setTimeout("runProgress()",max);
}
</script>
Above is a working example of the <progress>
element.