HTML_Progress
[ class tree: HTML_Progress ] [ index: HTML_Progress ] [ all elements ]
Prev Next

setAnimSpeed Manual

set the delay progress bar execution for the given number of miliseconds

by by Laurent Laville
mailto:pear@laurent-laville.org
February 2004, Laurent Laville
(HTML_Progress 1.1+)

Synopsis

void setAnimSpeed( $delay )

Attributes

Name Type
delay integer

Description

The setAnimSpeed() method delays progress bar execution for the given number of $delay miliseconds. Default value is zero (no delay).

Example

Example below will produced a progress bar with a delay progress bar execution equivalent to 1 second.

  1. <?php 
  2. require_once ('HTML/Progress.php');
  3.  
  4. $bar = new HTML_Progress();
  5. $bar->setAnimSpeed(200);
  6. $bar->setIncrement(5);
  7. ?>
  8. <!DOCTYPE html
  9.     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  10.     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  11.  
  12. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  13. <head>
  14. <title>setAnimSpeed example</title>
  15. <style type="text/css">
  16. <!--
  17. <?php echo $bar->getStyle()?>
  18. // -->
  19. </style>
  20. <script type="text/javascript">
  21. <!--
  22. <?php echo $bar->getScript()?>
  23. //-->
  24. </script>
  25. </head>
  26. <body>
  27.  
  28. <?php 
  29. echo $bar->toHtml()
  30.  
  31. do {
  32.     $bar->display();
  33.     if ($bar->getPercentComplete(== 1{
  34.         break;   // the progress bar has reached 100%
  35.     }
  36.     $bar->incValue();
  37. while(1);
  38. ?>
  39.  
  40. </body>
  41. </html>

See Also

getAnimSpeed Manual

Prev Up Next
getAnimSpeed Manual Reference Guides getProgressAttributes Manual

Documentation generated on Mon, 11 Mar 2019 13:52:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.