aboutsummaryrefslogtreecommitdiffstats
path: root/index.html
blob: 1ad2c036e073fdc08f6b7b5fd81a64dc3d550499 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
	<title>jsProgressBarHandler Demo | Javascript Progress/Percentage Bar</title>
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

	<!-- jsProgressBarHandler prerequisites : prototype.js -->
	<script type="text/javascript" src="js/prototype/prototype.js"></script>

	<!-- jsProgressBarHandler core -->
	<script type="text/javascript" src="js/bramus/jsProgressBarHandler.js"></script>


	<style type = "text/css">

		/* General Links */
		a:link { text-decoration : none; color : #3366cc; border: 0px;}
		a:active { text-decoration : underline; color : #3366cc; border: 0px;}
		a:visited { text-decoration : none; color : #3366cc; border: 0px;}
		a:hover { text-decoration : underline; color : #ff5a00; border: 0px;}
		img { padding: 0px; margin: 0px; border: none;}

		body {
			margin : 0 auto;
			width:100%;
			font-family: 'Verdana';
			color: #40454b;
			font-size: 12px;
			text-align:center;
		}



		.content {
			margin:20px;
			line-height:20px;
		}

		body h1 {
			font-size:14px;
			font-weight:bold;
			color:#CC0000;
			padding:5px;
			border-bottom:solid;
			border-bottom-width:1px;
			border-bottom-color:#333333;
		}

		body h2 {
			font-size:14px;
			font-weight:bold;
			color:#CC0000;
			padding:5px;
			border-bottom:solid;
			border-bottom-width:1px;
			border-bottom-color:#333333;
		}

		#demo {
			margin : 0 auto;
			width:100%;
		}

		#demo .extra {
			padding-left:30px;
		}

		#demo .options {
			padding-left:10px;
		}

		#demo .getOption {
			padding-left:10px;
			padding-right:20px;
		}

	</style>

</head>

<body>

	<div style="width:540px;margin : 0 auto; text-align:left;" >

		<p style="background: #ffff99; text-align: center; color: #000; border: 1px solid #ff9900; padding: 5px; font-size: 12px; font-weight: bold;">Looking for the <a href="http://www.bram.us/demo/projects/jsprogressbarhandler/ajaxprogressbar.html" title="">ajax demo</a>?</p>

		<h1>jsProgressBarHandler 0.3.3 | Javascript Progress/Percentage Bar</h1>

		<div id="demo">

			<h2>1. Automatically created Progress Bars (Default Styling)</h2>
			<span style="color:#006600;font-weight:bold;">Program Efficiency</span> <br/>
			<span class="progressBar" id="element1">15%</span>
			<span class="extra"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element1','0');return false;"><img src="images/icons/empty.gif" alt="" title="" onmouseout="$('Text1').innerHTML ='&laquo; Select Options'" onmouseover="$('Text1').innerHTML ='Empty Bar'"/></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element1','+5');return false;"><img src="images/icons/add.gif" alt="" title="" onmouseout="$('Text1').innerHTML ='&laquo; Select Options'" onmouseover="$('Text1').innerHTML ='Add 5%'"/></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element1','-5');return false;"><img src="images/icons/minus.gif" alt="" title="" onmouseout="$('Text1').innerHTML ='&laquo; Select Options'" onmouseover="$('Text1').innerHTML ='Minus 5%'" /></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element1','15');return false;"><img src="images/icons/set.gif" alt="" title="" onmouseout="$('Text1').innerHTML ='&laquo; Select Options'" onmouseover="$('Text1').innerHTML ='Set 15%'"/></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element1','100');return false;"><img src="images/icons/fill.gif" alt="" title="" onmouseout="$('Text1').innerHTML ='&laquo; Select Options'" onmouseover="$('Text1').innerHTML ='Fill 100%'" /></a></span>
			<span class="getOption"><a href="#" onclick="alert(myJsProgressBarHandler.getPercentage('element1'));return false;"><img src="images/icons/get.gif" alt="" title="" onmouseout="$('Text1').innerHTML ='&laquo; Select Options'" onmouseover="$('Text1').innerHTML ='Get Current %'"/></a></span>
			<span id="Text1" style="font-weight:bold">&laquo; Select Options</span>
			<br/><br/>


			<span style="color:#006600;font-weight:bold;">Website Projects Progress</span> <br/>
			<span class="progressBar" id="element2">35%</span>
			<span class="extra"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element2','0');return false;"><img src="images/icons/empty.gif" alt="" title="" onmouseout="$('Text2').innerHTML ='&laquo; Select Options'" onmouseover="$('Text2').innerHTML ='Empty Bar'"/></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element2','+10');return false;"><img src="images/icons/add.gif" alt="" title="" onmouseout="$('Text2').innerHTML ='&laquo; Select Options'" onmouseover="$('Text2').innerHTML ='Add 10%'"/></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element2','-5');return false;"><img src="images/icons/minus.gif" alt="" title="" onmouseout="$('Text2').innerHTML ='&laquo; Select Options'" onmouseover="$('Text2').innerHTML ='Minus 5%'" /></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element2','35');return false;"><img src="images/icons/set.gif" alt="" title="" onmouseout="$('Text2').innerHTML ='&laquo; Select Options'" onmouseover="$('Text2').innerHTML ='Set 35%'"/></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element2','80');return false;"><img src="images/icons/fill.gif" alt="" title="" onmouseout="$('Text2').innerHTML ='&laquo; Select Options'" onmouseover="$('Text2').innerHTML ='Fill 80%'" /></a></span>
			<span class="getOption"><a href="#" onclick="alert(myJsProgressBarHandler.getPercentage('element2'));return false;"><img src="images/icons/get.gif" alt="" title="" onmouseout="$('Text2').innerHTML ='&laquo; Select Options'" onmouseover="$('Text2').innerHTML ='Get Current %'"/></a></span>
			<span id="Text2" style="font-weight:bold">&laquo; Select Options</span>
			<br/><br/>

			<span style="color:#006600;font-weight:bold;">Weight Loss Progress</span> <br/>
			<span class="progressBar" id="element3">50%</span>
			<span class="extra"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element3','0');return false;"><img src="images/icons/empty.gif" alt="" title="" onmouseout="$('Text3').innerHTML ='&laquo; Select Options'" onmouseover="$('Text3').innerHTML ='Empty Bar'"/></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element3','+25');return false;"><img src="images/icons/add.gif" alt="" title="" onmouseout="$('Text3').innerHTML ='&laquo; Select Options'" onmouseover="$('Text3').innerHTML ='Add 25%'"/></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element3','-15');return false;"><img src="images/icons/minus.gif" alt="" title="" onmouseout="$('Text3').innerHTML ='&laquo; Select Options'" onmouseover="$('Text3').innerHTML ='Minus 15%'" /></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element3','50');return false;"><img src="images/icons/set.gif" alt="" title="" onmouseout="$('Text3').innerHTML ='&laquo; Select Options'" onmouseover="$('Text3').innerHTML ='Set 50%'"/></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element3','65');return false;"><img src="images/icons/fill.gif" alt="" title="" onmouseout="$('Text3').innerHTML ='&laquo; Select Options'" onmouseover="$('Text3').innerHTML ='Fill 65%'" /></a></span>
			<span class="getOption"><a href="#" onclick="alert(myJsProgressBarHandler.getPercentage('element3'));return false;"><img src="images/icons/get.gif" alt="" title="" onmouseout="$('Text3').innerHTML ='&laquo; Select Options'" onmouseover="$('Text3').innerHTML ='Get Current %'"/></a></span>
			<span id="Text3" style="font-weight:bold">&laquo; Select Options</span>
			<br/><br/>

			<span style="color:#006600;font-weight:bold;">Upload Progress Bar</span> <br/>
			<span class="progressBar" id="element4">80%</span>
			<span class="extra"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element4','0');return false;"><img src="images/icons/empty.gif" alt="" title="" onmouseout="$('Text4').innerHTML ='&laquo; Select Options'" onmouseover="$('Text4').innerHTML ='Empty Bar'"/></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element4','+45');return false;"><img src="images/icons/add.gif" alt="" title="" onmouseout="$('Text4').innerHTML ='&laquo; Select Options'" onmouseover="$('Text4').innerHTML ='Add 45%'"/></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element4','-30');return false;"><img src="images/icons/minus.gif" alt="" title="" onmouseout="$('Text4').innerHTML ='&laquo; Select Options'" onmouseover="$('Text4').innerHTML ='Minus 30%'" /></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element4','80');return false;"><img src="images/icons/set.gif" alt="" title="" onmouseout="$('Text4').innerHTML ='&laquo; Select Options'" onmouseover="$('Text4').innerHTML ='Set 80%'"/></a></span>
			<span class="options"><a href="#" onclick="myJsProgressBarHandler.setPercentage('element4','50');return false;"><img src="images/icons/fill.gif" alt="" title="" onmouseout="$('Text4').innerHTML ='&laquo; Select Options'" onmouseover="$('Text4').innerHTML ='Fill 50%'" /></a></span>
			<span class="getOption"><a href="#" onclick="alert(myJsProgressBarHandler.getPercentage('element4'));return false;"><img src="images/icons/get.gif" alt="" title="" onmouseout="$('Text4').innerHTML ='&laquo; Select Options'" onmouseover="$('Text4').innerHTML ='Get Current %'"/></a></span>
			<span id="Text4" style="font-weight:bold">&laquo; Select Options</span>
			<br/><br/>

			<h2>2. Manually created Progress Bars (Custom Styling)</h2>

			<span style="color:#006600;font-weight:bold;">Custom Progress Bar (without text, without animation)</span> <br/>
			<span id="element5">50%</span>
			<span class="extra"><a href="#" onclick="manualPB.setPercentage('0');return false;"><img src="images/icons/empty.gif" alt="" title="" onmouseout="$('Text5').innerHTML ='&laquo; Select Options'" onmouseover="$('Text5').innerHTML ='Empty Bar'"/></a></span>
			<span class="options"><a href="#" onclick="manualPB.setPercentage('+15');return false;"><img src="images/icons/add.gif" alt="" title="" onmouseout="$('Text5').innerHTML ='&laquo; Select Options'" onmouseover="$('Text5').innerHTML ='Add 15%'"/></a></span>
			<span class="options"><a href="#" onclick="manualPB.setPercentage('-30');return false;"><img src="images/icons/minus.gif" alt="" title="" onmouseout="$('Text5').innerHTML ='&laquo; Select Options'" onmouseover="$('Text5').innerHTML ='Minus 30%'" /></a></span>
			<span class="options"><a href="#" onclick="manualPB.setPercentage('80');return false;"><img src="images/icons/set.gif" alt="" title="" onmouseout="$('Text5').innerHTML ='&laquo; Select Options'" onmouseover="$('Text5').innerHTML ='Set 80%'"/></a></span>
			<span class="options"><a href="#" onclick="manualPB.setPercentage('50');return false;"><img src="images/icons/fill.gif" alt="" title="" onmouseout="$('Text5').innerHTML ='&laquo; Select Options'" onmouseover="$('Text5').innerHTML ='Fill 50%'" /></a></span>
			<span class="getOption"><a href="#" onclick="alert(manualPB.getPercentage());return false;"><img src="images/icons/get.gif" alt="" title="" onmouseout="$('Text5').innerHTML ='&laquo; Select Options'" onmouseover="$('Text5').innerHTML ='Get Current %'"/></a></span>
			<span id="Text5" style="font-weight:bold">&laquo; Select Options</span>
			<br/><br/>

			<span style="color:#006600;font-weight:bold;">Multi Color Bar</span> <br/>
			<span id="element6">[ Loading Progress Bar ]</span>
			<span class="extra"><a href="#" onclick="manualPB2.setPercentage('0', true);return false;"><img src="images/icons/empty.gif" alt="" title="" onmouseout="$('Text6').innerHTML ='&laquo; Select Options'" onmouseover="$('Text6').innerHTML ='Empty Bar'"/></a></span>
			<span class="options"><a href="#" onclick="manualPB2.setPercentage('+10');return false;"><img src="images/icons/add.gif" alt="" title="" onmouseout="$('Text6').innerHTML ='&laquo; Select Options'" onmouseover="$('Text6').innerHTML ='Add 10%'"/></a></span>
			<span class="options"><a href="#" onclick="manualPB2.setPercentage('-5');return false;"><img src="images/icons/minus.gif" alt="" title="" onmouseout="$('Text6').innerHTML ='&laquo; Select Options'" onmouseover="$('Text6').innerHTML ='Minus 5%'" /></a></span>
			<span class="options"><a href="#" onclick="manualPB2.setPercentage('30');return false;"><img src="images/icons/set.gif" alt="" title="" onmouseout="$('Text6').innerHTML ='&laquo; Select Options'" onmouseover="$('Text6').innerHTML ='Set 30%'"/></a></span>
			<span class="options"><a href="#" onclick="manualPB2.setPercentage('98'); manualPB2.setPercentage('30'); return false;"><img src="images/icons/fill.gif" alt="" title="" onmouseout="$('Text6').innerHTML ='&laquo; Select Options'" onmouseover="$('Text6').innerHTML ='Fill 98%, and then 30%'" /></a></span>
			<span class="getOption"><a href="#" onclick="alert(manualPB2.getPercentage());return false;"><img src="images/icons/get.gif" alt="" title="" onmouseout="$('Text6').innerHTML ='&laquo; Select Options'" onmouseover="$('Text6').innerHTML ='Get Current %'"/></a></span>
			<span id="Text6" style="font-weight:bold">&laquo; Select Options</span>
			<br /><br />

			<script type="text/javascript">
				document.observe('dom:loaded', function() {

					// first manuale progressbar : different bar (width, height, images) and no animation
					manualPB = new JS_BRAMUS.jsProgressBar(
								$('element5'),
								75,
								{
									showText	: false,
									animate		: false,
									width		: 154,
									height		: 11,
									boxImage	: 'images/bramus/custom1_box.gif',
									barImage	: 'images/bramus/custom1_bar.gif'
								}
							);

					// second manual example : multicolor (and take all other default paramters)
					manualPB2 = new JS_BRAMUS.jsProgressBar(
								$('element6'),
								52,
								{

									barImage	: Array(
										'images/bramus/percentImage_back4.png',
										'images/bramus/percentImage_back3.png',
										'images/bramus/percentImage_back2.png',
										'images/bramus/percentImage_back1.png'
									),

									onTick : function(pbObj) {

										switch(pbObj.getPercentage()) {

											case 98:
												alert('Hey, we\'re at 98!');
											break;

											case 100:
												alert('Progressbar full at 100% ... maybe do a redirect or sth like that here?');
											break;

										}

										return true;
									}
								}
							);
				}, false);
			</script>

		</div>

		<p style="background: #ffff99; text-align: center; color: #000; border: 1px solid #ff9900; padding: 5px; font-size: 12px; font-weight: bold;">This page is a testpage of jsProgressBarHandler - see <a href="http://www.bram.us/projects/js_bramus/jsprogressbarhandler/" title="jsProgressBarHandler | Javascript Progress/Percentage Bar">http://www.bram.us/projects/js_bramus/jsprogressbarhandler/</a> for details</p>

	</div>

	<!-- STATS -->
	<script src="/mint/?js" type="text/javascript"></script>

	<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
	<script type="text/javascript">
		// <![CDATA[
		_uacct = "UA-107008-4";
		urchinTracker();
		// ]]>
	</script>

</body>
</html>