Click here to Skip to main content
13,297,048 members (55,240 online)
Click here to Skip to main content
Add your own
alternative version


9 bookmarked
Posted 4 Dec 2012

HTML 5 Progress Bar For Progressive JavaScript Events Processing

, 4 Dec 2012
Rate this:
Please Sign up or sign in to vote.
Try this block of HTML 5 code

Create a new HTML file and copy the following code to see the result in your browser 

 <title>HTML 5 Progress Bar For Progressive Javascript Events Processing</title>
<progress id="progressBar" value="0" max="100" style="width:300px;"></progress>
<span id="status"></span>
<h1 id="finalMessage"></h1>
<script type="text/javascript" language="javascript">
function progressBarSim(al) {
  var bar = document.getElementById('progressBar');
  var status = document.getElementById('status');
  status.innerHTML = al+"%";
  bar.value = al;
	var sim = setTimeout("progressBarSim("+al+")",300);
	if(al == 100){
	  status.innerHTML = "100%";
	  bar.value = 100;
	  var finalMessage = document.getElementById('finalMessage');
	  finalMessage.innerHTML = "Process is complete";
var amountLoaded = 0;


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


About the Author

No Biography provided

You may also be interested in...


Comments and Discussions

GeneralMy vote of 5 Pin
Nitesh Maharaj4-Dec-12 22:48
memberNitesh Maharaj4-Dec-12 22:48 
SuggestionStuff I had to do to get it to work Pin
Nathaniel A Collier4-Dec-12 7:45
memberNathaniel A Collier4-Dec-12 7:45 
GeneralRe: Stuff I had to do to get it to work Pin
emad_hawaree4-Dec-12 22:18
memberemad_hawaree4-Dec-12 22:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171207.1 | Last Updated 4 Dec 2012
Article Copyright 2012 by Emad Al Hawary
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid