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

getScript Manual

returns the JavaScript code to manage the progress bar

by by Laurent Laville
mailto:pear@laurent-laville.org
November 2003, Laurent Laville
(HTML_Progress 1.0+)

Synopsis

string getScript()

Description

The getScript() method is used retrieve JavaScript code used to manage the progress bar. Returns value could be an URL that identify a JavaScript file target, or inline default internal code.

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.  
  8. $ui->setScript('progress.js');
  9.  
  10. print '<pre>';
  11. echo '<b>Progress bar managed by javascript </b><br/>';
  12. print_r($ui->getScript());
  13. echo '<br/>';
  14.  
  15. $ui->setScript(null);         // retrieve the default behaviour (internal js code)
  16.  
  17. echo '<b>Progress bar managed by javascript </b><br/>';
  18. print_r($ui->getScript());
  19. print '</pre>';
  20. ?>

See Also

setScript Manual

Prev Up Next
setOrientation Manual Reference Guides setScript Manual

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