css - Javascript setTimeout(); for ProgressBar doesn't work -


on website have progressbar , when click download button, progressbar starts. way want progress bit slowly, thought use settimeout();.

http://jsfiddle.net/phxsy/9/

if @ jsfiddle, when click download button happens. i've tested on firefox , console tells me referenceerror: starttime not defined.

how fix this?

you have errors in fiddle shared

  1. onclick="starttime(i);"should onclick="starttime(0)"

  2. the line

    document.getelementbyid("movingbar").style.width = + "%"; 

should be

   document.getelementbyid("prog").style.width = + "%"; 

as div name prog instead of movingbar

working fiddle


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -