Percent Progress Bar




This script isn't designed to use by itself, but rather as a complement to any script which may need a graphical representation of a percentage.

There are 3 functions to control this script (demonstrated by the links above):

You can use these functions in javascript links or controlled by a script.

When the bar eventually reaches 100%, it will run the command(s) inside a function called action(), which is currently set to hide the bar. Just add any javascript code you need into this function. There are instructions in the .js file for this.

You can specify an action to take place when the bar is clicked with the mouse. The action(s) to take place when this happens is determined by a function called clickBar(). This can be used to cancel the percentbar if the user clicks it. If you do not want anything to happen, just remove everything in this function.




Instructions:



1: Copy and paste the following script in the BODY section of your page wherever you want the bar to appear:
Select all...




2: Adjust the bar colors, width, and height in the .js file. Placement is determined by where you paste the code in step 1 into your page.


3: Finally, upload the "percent_bar.js" file to your server.