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

Source for file hidden.php

Documentation is available at hidden.php

  1. <?php
  2. @include '../include_path.php';
  3. /**
  4.  * Simple example that hide a progress meter at end of process.
  5.  *
  6.  * @version    $Id: hidden.php,v 1.1 2004/06/27 18:30:54 farell Exp $
  7.  * @author     Laurent Laville <pear@laurent-laville.org>
  8.  * @package    HTML_Progress
  9.  */
  10.  
  11. require_once 'HTML/Progress.php';
  12.  
  13. /*
  14.     user callback: job to do while the progress meter is visible
  15.  */
  16. function myFunctionHandler($progressValue&$obj)
  17. {
  18.     $obj->sleep();  // nothing to do here, except sleep a bit ...
  19. }
  20.  
  21. $progress = new HTML_Progress();
  22. $progress->setAnimSpeed(100);
  23. $progress->setIncrement(10);
  24. $progress->setProgressHandler('myFunctionHandler');
  25. ?>
  26. <html>
  27. <head>
  28. <style type="text/css">
  29. <!--
  30. body {
  31.     background-color: #CCCC99;
  32.     color: #996;
  33.     font-family: Verdana, Arial;
  34. }
  35.  
  36. a:visited, a:active, a:link {
  37.     color: yellow;
  38. }
  39.  
  40. <?php echo $progress->getStyle()?>
  41. // -->
  42. </style>
  43. <script type="text/javascript">
  44. <!--
  45. <?php echo $progress->getScript()?>
  46. //-->
  47. </script>
  48. </head>
  49. <body>
  50.  
  51. <?php 
  52. echo $progress->toHtml();  
  53. $progress->run();
  54. $progress->hide();
  55. ?>
  56.  
  57. <h1>Your job is finished ! </h1>
  58. <p>The progress meter is now hidden.</p>
  59. <p>&lt;&lt; <a href="../index.html">Back examples TOC</a></p>
  60.  
  61. </body>
  62. </html>

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