Re: progession bar

From: Date: Wed, 09 May 2001 13:22:19 +0000
Subject: Re: progession bar
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-52133@lists.php.net to get a copy of this message
This is a very simple progress bar, you need to decorate it. As you can see the step() function deals with the ellapsed time. For more see your favourite javascript manual or for example http://www.webreference.com/dhtml/ Feel free to use it: <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <style> #container { WIDTH: 60px; POSITION: absolute; TOP: 80px; BACKGROUND-COLOR: red } #progress { WIDTH: 1px; BACKGROUND-COLOR: blue } </style> <SCRIPT language='Javascript1.2'> <!-- function start() { if(document.layers) { ellapsed = document.progress; } else if (document.all) { ellapsed = progress.style }; ellapsed.width = 0; step(); } function step() { if (parseInt(ellapsed.width) < 60) { setTimeout('step()', 100)}; ellapsed.width = parseInt(ellapsed.width) + 1; } // --> </SCRIPT> </head> <body> <a href="javascript:start();">click to start</a> <p>this progress bar is in hurry :), you should adjust the 2nd argument of setTimeout() in function step() from 100 to what you prefer.</p> <!-- here comes the progress bar --> <div id='container'><span id='progress'></span></div> </body> </html> ----- Original Message ----- From: "Jacky" <jacky@activelifestyle.com> To: <php-general@lists.php.net> Sent: 2001. május 9. 19:32 Subject: [PHP] progession bar Hi all Does any one know how to do the progession bar to mesure the time out? Like give it 1 minute for the bar to progress, I got some logic here but something still unclear to me. The procedures I see are 1. get curren time when the page is loaded 2. add 60 seconds on that current time value to tell when to stop the bar 3. make a table , 6 rows so each row repersent every 10 seconds 4. This is the bit where I got stuck, how do I change the color of table cell every 10 secs for 6 times. any help will be thankful Jack jacky@activelifestyle.com "There is nothing more rewarding than reaching the goal you set for yourself"

« previous php.general (#52133) next »