PEAR Progress2 logo

HTML_Progress2 : The Definitive Guide

Chapter 21. Examples

Table of Contents

Basic usage
Indeterminate Mode usage
Multiple Labels usage
Observer usage
Monitoring usage
Progress Generator wizard usage

Basic usage

Figure 21.1. Basic usage with default skin

Basic usage with default skin

This example has no particular goals. It should be your first run to show the minimum stuff required for a demo to works.

Example 21.1. Without any customization

  1. <?php
  2. require_once 'HTML/Progress2.php';
  3.  
  4. $pb = new HTML_Progress2();
  5. $pb->setAnimSpeed(100);
  6. ?>
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  8.     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  9. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  10. <head>
  11. <title>Progress2 Basic example</title>
  12. <?php
  13. echo $pb->getStyle(false);
  14. echo $pb->getScript(false);
  15. ?>
  16. </head>
  17. <body>
  18.  
  19. <?php
  20. $pb->display();
  21. $pb->run();
  22. ?>
  23.  
  24. </body>
  25. </html>
HTML_Progress2 : The Definitive Guide v 2.4.0 : April 20, 2007