A simple progress bar that you can addUp with some common events' like redirecting the user to another source. And while they wait let this progress bar do some work for them...
Progress Bar
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
form { margin: 0; padding: 0; }
form div { margin: 0;
padding: 0;
}
input { margin: 0;
padding: 0;
border: none;
display: block;
height: 4px;
width: 13px;
float: left;
}
.a { background-color: grey; }
.b { background-color: dimgrey; }
.c { background-color: grey; }
.d { background-color: dimgrey; }
.e { background-color: grey; }
.f { background-color: dimgrey; }
.g { background-color: grey; }
#wrapper {
float: left;
font-size: 46px;
font-weight: bold;
margin: 20px 0 0 10px;
text-align: left;
color: silver;
}
</style>
<script type="text/javascript">
<!-- BEGIN HIDING
/* By : essential
A simple progress bar-
that you can addUp with
any event on your page'.
This simple demo will perform
redirection to the user. To let you see how this progress bar works on this page! */
function newLocation()
{
var counter = setTimeout( 'newLocation()', 1000 ) -1;
var _loading = [ 'L', 'L 0', 'L 0 A', 'L 0 A D', 'L 0 A D I', 'L O A D I N', 'L O A D I N G' ];
var barColor = [ 'a', 'b', 'c', 'd', 'e', 'f', 'g' ];
bar.elements[counter].blur();
bar.elements[counter].className = barColor[counter];
if ( counter == 6 )
{
clearTimeout( counter );
window.location = 'http://YourDomainName.com';
}
document.getElementById('container').innerHTML = _loading[counter];
}
// DONE HIDING -->
</script>
</head>
<body onload="newLocation();">
<div id="wrapper">
<span id="container"> </span><br />
<form name="bar">
<div>
<input name="b1" class="fake" type="text" size="2" />
<input name="b2" class="fake" type="text" size="2" />
<input name="b3" class="fake" type="text" size="2" />
<input name="b4" class="fake" type="text" size="2" />
<input name="b5" class="fake" type="text" size="2" />
<input name="b6" class="fake" type="text" size="2" />
<input name="b7" class="fake" type="text" size="2" /></div>
</form>
</div>
</body>
</html>
DealthRune 2 Light Poster
ayesha789 7 Posting Pro in Training
BSkiLLs 0 Junior Poster in Training
israelvainberg 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.