HTML_Progress::setAnimSpeed

HTML_Progress

Prev |  | Next
HTML_Progress::setAnimSpeed sets the delay execution in milliseconds of the progress meter ## Synopsis require_once 'HTML/Progress.php'; void HTML_Progress::setAnimSpeed( int $delay) ## Description This method is used to set progress meter delay execution in milliseconds. Default value is zero (no delay). ## Parameter int $delay the delay execution in milliseconds of the progress meter ## Throws

Possible PEAR_Error values

Error level | Error code | Error message | Solution
exception | HTML_PROGRESS_ERROR_INVALID_INPUT | Parameter #1 "$delay" is not an integer | Fixed the cast of parameter
error | HTML_PROGRESS_ERROR_INVALID_INPUT | invalid input, parameter #1 "$delay" was expecting "greater than zero" | Expected an integer between zero and 1000
error | HTML_PROGRESS_ERROR_INVALID_INPUT | invalid input, parameter #1 "$delay" was expecting "less or equal 1000" | Expected an integer between zero and 1000
## Note ( HTML_Progress >= 1.1 )
| This function can not be called statically.
## See HTML_Progress::getAnimSpeed ## Example Example below (that requires HTML_Progress >= 1.2.0RC3) will produced a progress bar with a delay excecution equivalent to half of a second (see especially line 5).

    <?php
    require_once 'HTML/Progress.php';

    $bar = new HTML_Progress();
    $bar->setAnimSpeed(500);
    $bar->setIncrement(5);
    ?>
    <!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>setAnimSpeed example</title>
    <style type="text/css">
    <!--
    <?php echo $bar->getStyle(); ?>
    // -->
    </style>
    <script type="text/javascript">
    <!--
    <?php echo $bar->getScript(); ?>
    //-->
    </script>
    </head>
    <body>

    <?php
    echo $bar->toHtml();
    $bar->run();
    ?>

    </body>
    </html>
Prev | Up | Next
HTML_Progress::getAnimSpeed | Reference Guide | HTML_Progress::getString
Documentation generated on Sun, 12 Sep 2004 20:23:04 +0200 by phpDocumentor 1.3.0RC3