WinXP Progress Bar Script, Scrips, Java, DHTML, Express
Contact
 


Quick search

 



Scripts - DHTML

Scripts - DHTML (new)

Web Developer Blog

Web Developer Blog (new)

Scripts and Applications

Ajax
ASP
ASP.NET
C and C++
CFML
CGI and Perl
Flash
Java
JavaScript
PHP
Python
XML

Software Downloads

Linux

Windows

Mac

Mobile

Drivers

DHTML Scripts - Detail

 

WinXP Progress Bar

Date added: 2007-06-16 17:31:16
FF1+ IE5+ Opr7+

WinXP Progress Bar (version 1.2)

Description: A great looking pure DHTML progress bar that resembles the one seen in Window XP's startup screen. All visual aspects of the bar can be customized, and the script can be invoked multiple times to display multiple bars on the same page. Script works in both IE5+ and NS6+.

Note that this script by default doesn't perform any action other than animating the progress bar. It's up to you to create helper functions to accomplish any relevant tasks.

Demo:


Directions: Developer's View

Step 1: Insert the following script in the HEAD section of your page

Select All

The above script references an external .js file, which you can download below:

WinXP-Progress-Bar.html/xp_progress.js (download by right clicking, and selecting "Save As")

Be sure to upload this .js file to your web server.

Step 2: Within the BODY of your page where you wish the Progress Bar to appear, add the below script:

<script type="text/javascript">
var bar1= createBar(300,15,'white',1,'black','blue',85,7,3,"");
</script>

That's it! Read on for an explanation of each parameter within function createBar().

Explanation of parameters within createBar()

To customize the look of the progress bar, simply pass in different values into createBar():

var xyz = createBar(width, height, backgroundColor, borderWidth, borderColor, blockColor, scrollSpeed, blockCount, actionCount, actionString)

 They are:

  • xyz - An arbitrary variable name to store the bar reference and must be unique. This variable will have a few different methods (explained later) which can be used to control some of each bar's behavior. This variable IS REQUIRED if you wish to use these methods. However, if you do not plan to use the methods, then the variable assignment is not necessary, but it won't hurt to use it anyway.
  • width- Total width of the entire bar in pixels.
  • height- Total height of the entire bar in pixels.
  • backgroundColor- Background color of the bar. Use valid CSS color or HEX color code value.
  • borderWidth- The width of the border around the bar, in pixels.
  • borderColor- The color of the border around the bar. Use valid CSS color or HEX color code value.
  • blockColor- The darkest color of the individual blocks. The color will progressively become more transparent. Use valid CSS color or HEX color code value.
  • scrollSpeed- The delay, in milliseconds, between each scroll step. Use smaller values for faster scroll speeds.
  • blockCount- The total number of blocks to use.
  • actionCount - The number of times the bar is to scroll before actionString is performed.
  • actionString - The javascript function, in string form, to execute once the bar has scrolled actionCount times. Set this to an empty string to do nothing. If doing nothing, you can use any number as actionCount.

So for example, by changing the parameter settings, you can display a different looking Progress Bar, and one that executes a function after the Progress Bar has scrolled 3 cycles:

<script type="text/javascript">
var bar2= createBar(320,15,'white',1,'black','green',85,7,3,"alert('Hi there')");
</script>

(alert message disabled in actual demo).

Explanation of methods() to control the progress bar

Each bar, when assigned to a variable (ie: bar2) has several control methods you can call directly via javascript or in a link. These methods allow you to do things like pause the Progress Bar, hide or reveal it. Each of these is described below, along with an example which will control the bar above.

Method Example Description
var.toggleBar() toggle pause This method will toggle the pause status of the bar. If it is paused, it will un-pause it, and vice-versa. The code for the link at left is:
<a href="javascript:bar2.togglePause()">toggle pause</a>
var.hideBar() Hide Bar 2 This method will show the bar. If it is already visible, it will do nothing. The code for the link at left is:
<a href="javascript:bar2.hideBar()">Hide Bar 2</a>
var.showBar() Show Bar 2 This method will hide the bar. If it is already hidden, it will do nothing. The code for the link at left is:
<a href="javascript:bar2.showBar()">Show Bar 2</a>

Try clicking the links in the middle column to see how it affects the green Progress Bar.

Just in case you're confused how all this fits together, here's an example that scrolls a Progress Bar for 5 cycles before pausing and redirects to another page:

<script type="text/javascript">

function redirectpage(){
bar3.togglePause()
window.location="http://www.javascriptkit.com"
}

var bar3= createBar(320,15,'white',1,'black','red',85,7,5,"redirectpage()");
</script>

 

Leave a comment




(optional)

What is 7-3?




0 comments


 

Related DHTML Scripts

Pie Graph script
Date Added: 2007-06-16
-User Submitted This is a purely DHTML/ CSS based Pie Graph script. It loads fast and blends in with the rest of the page....
Line Graph script
Date Added: 2007-06-16
-User Submitted Based on the same library as the Pie Graph script, this is a purely DHTML/ CSS based Line Graph script. It loads fast and blends in with the rest of the page....
Find In Page Script
Date Added: 2007-06-16
-User Submitted This cross browser DHTML script simulates the Edit> Find In Page feature of the browser to allow your visitors to easily search for a particular text on your page.&nb...
Tip of the day dialog
Date Added: 2007-06-16
-User Submitted Provide daily tidbits of interesting information to your visitors, in an even more interesting way, with this ultimate tip of the day script!...
Copy text to clipboard script
Date Added: 2007-06-16
-User Submitted This "demo" script does two things: 1) identifies the selected text on the page 2) copies this text to clipboard. As part of a larger application...
onMouseover scrollbar effect
Date Added: 2007-06-16
-User Submitted Use this unique script to apply a rollover effect to your webpage's scrollbar!...
Ajax load XML file script
Date Added: 2007-06-16
-User Submitted This script demonstrates the concept of using Ajax to load a simple XML file and display it on the page....
Gradient Bar
Date Added: 2007-06-16
-User Submitted An impressive demonstration of using DHTML code to render a gradient bar. Easily change the bar's color, position and direction, all through the setting of a few variabl...
Phong
Date Added: 2007-06-16
-User submitted Phong is an incredible ping-pong game with an even more impressive AI (artificial intelligence). Play against the computer, and see if you can win (take it for us, it's pos...
Phong II
Date Added: 2007-06-16
-User submitted Similar to the above, this is a fun, one player DHTML Phong (Ping Pong) game. Uses cos and sin to move the ball at a specified angle, and the ball's angle can be altered by moving ...
Reflex Tester
Date Added: 2007-10-24
-User submitted Test and sharpen your reflexes with this DHTML reflex tester. Calculates how fast you can react to a "HTML block" that changes color....
Tower of Hanoi
Date Added: 2007-10-24
-User submitted The Tower of Hanoi is a classic puzzle game where you try to move disks from the left-most pole to the right using the least amount of moves. This DHTML script features full dr...
Snow Effect without images
Date Added: 1999-11-30
-User submitted This script uses a series of DIV tags to create falling snow that trickles down an entire webpage, without using images....
3D starfield
Date Added: 1999-11-30
-User submitted Take your webpage into the stars with this 3D starfield script! The stars travel towards you in an incessant manner....
Set site as homepage script
Date Added: 1999-11-30
-User Submitted This is the highly requested IE 5 script that allows your surfers to set your site as their default homepage simply with a click of the mouse! Increase your site's popul...

Last 20 Scripts

 
1. JamUba AJAX Stock Script
JamUba AJAX Stock Script allows the user to embed a flexible
2. YouTube Video Script
YouTube Video Script runs on YouTube API and fetches million
3. Smooth Navigational Menu
Smooth Navigational Menu is a multi level, CSS list based me
4. JamUba ftpsync Script
JamUba ftpsync Script is a Perl utility to synchronize the h
5. Easy 2Checkout Integrator
Easy 2Checkout Integrator script provides a simple and easy
6. Wussa
Wussa is a script suitable for webmasters planning to create
7. WPJobAds
WPJobAds is a WordPress job board plugin that lets you sell
8. Wallpaper Website Creator
Wallpaper Website Creator is a PHP based script that helps y
9. Flex2 Advanced ColorPicker
Flex2 Advanced ColorPicker is a color picker component for F
10. Tree CheckBox
Tree CheckBox is a Flex3 component resulted from the customi
11. ResizeTool
ResizeTool is a simple and easy to use resize tool to be imp
12. Flickr Cube Viewer
Flickr Cube Viewer is a small utility based on Flex that all
13. Font Reader
Font Reader is an Actionscript 3 based true type font parser
14. iPod like Scroller
iPod like Scroller is a simple component which can simulate
15. AMFPHP
AMFPHP is a free open-source PHP implementation of the Actio
16. FlashFlickr PhotoGallery
FlashFlickr PhotoGallery is an image gallery made in Flex2/A
17. jQuery.popeye
jQuery.popeye script is an inline lightbox alternative.
18. prettyComments
prettyComments script provides a solution for comment boxes
19. prettyPopin
prettyPopin provides a nice way to display simple content or
20. MYRE Realty Manager
MYRE Realty Manager is a complete realty listing management

DownloadTube Editor Reviews

 
1. Server2Go
Server2Go is a Webserver that runs out of the box without an...
2. PPT to EXE Converter
PPT to EXE Converter is an easy-to-use, friendly and reliabl...
3. Shine DVD To FLV Converter
Shine DVD to FLV Converter is a powerful and easy-to-use con...
4. Speed Shop & Inventory Log
Speed Shop & Inventory Log is an easy inventory and shopping...
5. Excel Delete Rows or Columns Based On Cell Content Software
Excel Delete Rows or Columns Based On Cell Content Software ...
6. WordTempl
WordTempl is a user-friendly software designed to accelerate...
7. Jocsoft MP4 Video Converter
Jocsoft MP4 Video Converter is a powerful and yet easy to us...
8. Easy Time Logs Express
Easy Time Logs is a time tracking, timesheet, and project ma...
9. Flash Menu Maker
You may use this 3D Flash Menu Builder with special text eff...
10. 1-abc.net Hard Drive Washer
Windows and nearly all other software that is installed on i...

Software Reviews Full List



Top Downloads

 
1. Canon PIXMA iP1000 Printer Driver
2. Canon PIXMA iP1200 Printer Driver
3. Canon PIXMA iP1300 Printer Driver a
4. Canon PIXMA MP210 MP Drivers
5. Realtek ALC/ 262/ 265/ 268/ 660/ 861/ 880/ 882/ 883/ 885/ 888 Audio
6. Asus EZVcr II
7. Canon i-SENSYS LBP2900 Printer Driver R
8. Canon PIXMA iP1300 Printer Driver c
9. JavaScript Page Preloader
10. Canon PIXMA MP140 MP Drivers
11. Canon PIXMA MP160 MP Drivers xp64
12. Canon PIXMA MP220 MP Drivers
13. Realtek RTL8139C(L)+/RTL8139D(L)/RTL8100(L)/RTL8130/RTL8139B(L) Driver
14. Canon PIXMA MP130 MP Drivers 2kxp
15. Canon PIXMA iP5000 Printer Driver b
16. Canon PIXMA MP170 MP Navigator
17. Canon PIXMA iP1600 Printer Driver
18. Canon PIXMA iP1200 Printer Driver x64 d
19. Realtek RTL8100B(L)/RTL8100C(L)/RTL8101L/RTL8139C(L) Driver XP
20. Lite-On Cd-Rw LTR-48327S firmware