View Single Post
07-01-2007, 11:50 PM
#7
Salathe is offline Salathe
Salathe's Avatar
Status: Community Archaeologist
Join date: Jul 2004
Location: Scotland
Expertise: Software Development
Software: vim, PHP
 
Posts: 3,820
iTrader: 25 / 100%
 

Salathe will become famous soon enough

Send a message via MSN to Salathe

  Old

Why not add an extra line in the JavaScript to change the percentage width?

Code:
...
if ( c - 1 == 100 ) { clearTimeout( t ) }
else { document.getElementById("progress").style.width = c + "px"; }
...
Don't forget to change the 'name' attribute to 'id', else the above change won't really help at all.

With all that said, your code doesn't really seem to be attempting to do anything useful. It'll just animate the progress bar from 0 to 100 pixels over a period of time and then stop. Are you trying to implement some form of upload progress meter to accurately represent the state of the upload?