HTML_Progress
[ class tree: HTML_Progress ] [ index: HTML_Progress ] [ all elements ]
Prev Next
HTML_Progress_UI::getScript
returns the JavaScript code to manage the progress bar

Synopsis

require_once 'HTML/Progress/UI.php';

string HTML_Progress_UI::getScript()

Description

This method is used retrieve JavaScript code used to manage the progress meter.

Returns value could be an URL that identify a JavaScript file target, or inline default internal code.

Note

( HTML_Progress >= 0.5 )

This function can not be called statically.

See

HTML_Progress_UI::setScript

Example

Example below will retrieve default internal javascript code after overloaded it at construction time.

  1. <?php
  2. require_once 'HTML/Progress.php';
  3.  
  4. $bar = new HTML_Progress();
  5.  
  6. $ui =& $bar->getUI();
  7. $ui->setScript('progress.js');
  8.  
  9. print '<pre>';
  10. echo '<b>Progress bar managed by javascript </b><br/>';
  11. print_r($ui->getScript());
  12. echo '<br/>';
  13.  
  14. $ui->setScript(null); // retrieve the default behavior (internal js code)
  15.  
  16. echo '<b>Progress bar managed by javascript </b><br/>';
  17. print_r($ui->getScript());
  18. print '</pre>';
  19. ?>

Prev Up Next
HTML_Progress_UI::setProgressAttributes Reference Guide HTML_Progress_UI::setScript

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