Set value for ProgressBar : ProgressBar « Dojo toolkit « JavaScript DHTML






Set value for ProgressBar

 

<html>
  <head>
    <link rel="StyleSheet" type="text/css"
      href="js/dojo/dijit/themes/tundra/tundra.css">
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
        dojo.require("dijit.ProgressBar");
        dojo.require("dojo.parser");
        function download(){
            jsProgress.update({ maximum: 20, progress:0 });
            for (var i=0; i<=20; i++){
                setTimeout("jsProgress.update({ progress: " + i + " })",(i+1)*100 );
            }
        }
    </script>
  </head>
  <body class="tundra">
    <div dojoType="dijit.ProgressBar" jsId="jsProgress"></div>
    <input type="button" value="Start" onclick="download();" />
  </body>
</html>

   
  








Dojo-toolkit.zip( 3,849 k)

Related examples in the same category

1.ProgressBar Interval
2.ProgressBar creation
3.ProgressBar dialog
4.ProgressBar: maximum value, progress
5.Create ProgressBar