My Javascript (non-AJAX) Progress / Percentage Bar : jsProgressBarHandler 0.3

jsprogressbarhandlerajax.jpgA new version of jsProgressBarHandler is avaiable. Changes are a bugfix to making multiple barImages properly work with Safari and addition of an internal queue.

What is jsProgressBarHandler all about?

jsProgressBarHandler is a Javascript based Percentage Bar / Progress Bar, inspired upon JS-code by WebAppers and CSS-code by Bare Naked App. Version 0.1 was a mere rewrite to PrototypeJS of the version by WebAppers whilst version 0.2 was a full structural rewrite. Version 0.3 builds upon 0.2 by making it all more robust.

So, what has changed?

Internally jsProgressBarHandler now uses a queue on which it stacks the percentages to move to. This prevents the progressbar from freaking out when multiple simultaneous (viz. on the very same moment) calls to setPercentage() are made. jsProgressBarHandler will push all percentages on that queue, and process them one by one.

Anything else has changed?

Yes! jsProgressBarHandler user Chris brought to my attention that the multiple barImages option did not work properly in Safari. Reason was that Safari handles the object.constructor (which jsProgressBarHandler uses to determine if a parameter is an Array or not) differently than other browsers. (FYI: A working version of isArray() has been posted on by now ;))

Cool, is there a demo?

jsProgressBarHandler Demo

TIP: At the multicolor bar at the bottom, click that -icon a few times to see the internal queue in effect 😉

Please note that next to the demo above even an AJAX demo exists!

Where can I download it?

Right here:;/wp-content/uploads/2008/02/;Download jsProgressBarHandler 0.3.0;

WARNING! This version is outdated!
Grab the latest version over at the jsProgressBarHandler Project Page

Wow, you’re going to fast: I have a question, I need help, I need more info, how do I configure this thing?

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Unless noted otherwise, the contents of this post are licensed under the Creative Commons Attribution 4.0 License and code samples are licensed under the MIT License

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.