Examples TOCexamples

Default ProgressBar Monitor

$Date: 2005/07/25 12:15:50 $

 Table of contents

Introduction

This example requires :

Be aware that:


This example will run a default ProgressBar Monitor, and used a default QuickForm renderer without any form template customizations. No user callback was defined.

[Top]

 Render options

Even if we used default monitor values, we have changed on bar itself :
speed = 50 (at line 17)
HTML_Progress::setAnimSpeed()
increment = 10 (at line 18)
HTML_Progress::setIncrement()

[Top]

 Output

Screenshot

[Top]

 PHP source syntax highlight

  1. <?php
  2. /**
  3.  * Simple Default Monitor ProgressBar example.
  4.  *
  5.  * @version    $Id: default1.php,v 1.2 2005/07/25 12:15:50 farell Exp $
  6.  * @author     Laurent Laville <pear@laurent-laville.org>
  7.  * @package    HTML_Progress
  8.  * @subpackage Examples
  9.  */
  10.  
  11. require_once 'HTML/Progress/monitor.php';
  12.  
  13.  
  14. $monitor = new HTML_Progress_Monitor();
  15.  
  16. $bar =& $monitor->getProgressElement();
  17. $bar->setAnimSpeed(50);
  18. $bar->setIncrement(10);
  19. ?>
  20. <html>
  21. <head>
  22. <title>ProgressBar Monitor - Default renderer </title>
  23. <style type="text/css">
  24. <!--
  25. .progressStatus {
  26.     color:#000000;
  27.     font-size:10px;
  28. }
  29. <?php echo $monitor->getStyle(); ?>
  30. // -->
  31. </style>
  32. <script type="text/javascript">
  33. <!--
  34. <?php echo $monitor->getScript(); ?>
  35. //-->
  36. </script>
  37. </head>
  38. <body>
  39.  
  40. <?php
  41. echo $monitor->toHtml();
  42. $monitor->run();
  43. ?>
  44.  
  45. </body>
  46. </html>

[Top]