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):
- incrCount(n) - This increments the current percent value by n%.
- decrCount(n) - This decrements the current percent value by n%.
- setCount(percent_value) - This sets the current percent value to whatever percent_value you specify; 0 to 100.
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: