Examples TOCexamples

HTMLPage ProgressBar Generator

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

 Table of contents

Introduction

This example requires :

Be aware that:


This example will run a ProgressBar Controller Wizard using the HTMLPage QF rendering. It will help you to create your own progress bar. You may even save the CSS and/or PHP code at end !

Few lines of code are necessary to run this generator. First we start a session at line 14 (to keep data), then we create a HTML_Progress_Generator instance at line 16 without options, and finally run the controller wizard itself at line 17.

Difference from previous example is to use the HTMLPage QF rendering as ActionDisplay (see line 12).

[Top]

 Render options

Uses defaults: Display render is overloaded by : As we still use the default class name 'ActionDisplay', no need to tell it with the second parameter of HTML_Progress_Generator class constructor.
See a script example of
how to customize all actions (preview, display, process).

[Top]

 Output

Screenshot

[Top]

 PHP source syntax highlight

  1. <?php
  2. /**
  3.  * Generator usage example using HTMLPage renderer.
  4.  *
  5.  * @version    $Id: htmlpage.php,v 1.2 2005/07/25 12:52:15 farell Exp $
  6.  * @author     Laurent Laville <pear@laurent-laville.org>
  7.  * @package    HTML_Progress
  8.  * @subpackage Examples
  9.  */
  10.  
  11. require_once 'HTML/Progress/generator.php';
  12. require_once 'HTML/Progress/generator/HTMLPage.php';
  13.  
  14. session_start();
  15.  
  16. $tabbed = new HTML_Progress_Generator();
  17. $tabbed->run();
  18. ?>

[Top]