HTML_Progress
[ class tree: HTML_Progress ] [ index: HTML_Progress ] [ all elements ]
Prev Next
HTML_Progress::setAnimSpeed
sets the delay execution in milliseconds of the progress meter

Synopsis

require_once 'HTML/Progress.php';

void HTML_Progress::setAnimSpeed( int $delay)

Description

This method is used to set progress meter delay execution in milliseconds.

Default value is zero (no delay).

Parameter

    int $delay
  • the delay execution in milliseconds of the progress meter

Throws

Possible PEAR_Error values

Error level Error code Error message Solution
exception HTML_PROGRESS_ERROR_INVALID_INPUT Parameter #1 "$delay" is not an integer Fixed the cast of parameter
error HTML_PROGRESS_ERROR_INVALID_INPUT invalid input, parameter #1 "$delay" was expecting "greater than zero" Expected an integer between zero and 1000
error HTML_PROGRESS_ERROR_INVALID_INPUT invalid input, parameter #1 "$delay" was expecting "less or equal 1000" Expected an integer between zero and 1000

Note

( HTML_Progress >= 1.1 )

This function can not be called statically.

See

HTML_Progress::getAnimSpeed

Example

Example below (that requires HTML_Progress >= 1.2.0RC3) will produced a progress bar with a delay excecution equivalent to half of a second (see especially line 5).

  1. <?php
  2. require_once 'HTML/Progress.php';
  3.  
  4. $bar = new HTML_Progress();
  5. $bar->setAnimSpeed(500);
  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. $bar->run();
  31. ?>
  32.  
  33. </body>
  34. </html>

Prev Up Next
HTML_Progress::getAnimSpeed Reference Guide HTML_Progress::getString

Documentation generated on Sun, 12 Sep 2004 20:23:04 +0200 by phpDocumentor 1.3.0RC3