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.
- <?php
- require_once 'HTML/Progress.php';
-
- $bar = new HTML_Progress();
-
- $ui =& $bar->getUI();
- $ui->setScript('progress.js');
-
- print '<pre>';
- echo '<b>Progress bar managed by javascript </b><br/>';
- print_r($ui->getScript());
- echo '<br/>';
-
- $ui->setScript(null); // retrieve the default behavior (internal js code)
-
- echo '<b>Progress bar managed by javascript </b><br/>';
- print_r($ui->getScript());
- print '</pre>';
- ?>