| Current File : //opt/RZphp5/includes/doc/HTML_Progress2/docs/TDG/ch03.html |
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>
Chapter 3. FAQ - Frequently Asked Questions
</title>
<link rel="stylesheet" href="book.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1" />
<link rel="start" href="index.html" title="HTML_Progress2 Manual" />
<link rel="up" href="pt01.html" title="Part I. Introduction" />
<link rel="prev" href="ch02s05.html" title="Version 2.4.x" />
<link rel="next" href="pt02.html" title=
"Part II. Getting Started" />
<style type="text/css">
/*<![CDATA[*/
body {
background-color: white;
color: black;
}
:link { color: #0000FF }
:visited { color: #840084 }
:active { color: #0000FF }
div.c3 {margin-left: 0.5in; margin-right: 0.5in;}
div.c2 {font-family: monospace;}
col.c1 {text-align: left}
/*]]>*/
</style>
</head>
<body>
<table class="progress2Header">
<tr>
<td>
<img src="img/pear_progress2.gif" align="left" alt=
"PEAR Progress2 logo" />
<h1>
HTML_Progress2 : The Definitive Guide
</h1>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">
Chapter 3. FAQ - Frequently Asked Questions
</th>
</tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="ch02s05.html">Prev</a>
</td>
<th width="60%" align="center">
Part I. Introduction
</th>
<td width="20%" align="right">
<a accesskey="n" href="pt02.html">Next</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<div class="chapter" lang="en">
<div class="titlepage">
<h2 class="title">
<a name="faq"></a>Chapter 3. FAQ - Frequently Asked
Questions
</h2>
</div>
<div class="qandaset">
<dl>
<dt>
3.1. <a href="ch03.html#id4783253">General questions</a>
</dt>
<dd>
<dl>
<dt>
3.1.1. <a href="ch03.html#id4783258">What does it cost ?</a>
</dt>
<dt>
3.1.2. <a href="ch03.html#id4783224">Do you offer support ?</a>
</dt>
<dt>
3.1.3. <a href="ch03.html#id4782906">I found a bug, what shall
i do ?</a>
</dt>
<dt>
3.1.4. <a href="ch03.html#id4785402">What is
HTML_Progress2_Lite ?</a>
</dt>
<dt>
3.1.5. <a href="ch03.html#id4785436">What is PHP_Compat ?</a>
</dt>
<dt>
3.1.6. <a href="ch03.html#id4785471">What is HTML_QuickForm
?</a>
</dt>
<dt>
3.1.7. <a href="ch03.html#id4785526">What is
HTML_QuickForm_Controller ?</a>
</dt>
<dt>
3.1.8. <a href="ch03.html#id4785580">What is PEAR ?</a>
</dt>
<dt>
3.1.9. <a href="ch03.html#id4785642">What is PEAR_ErrorStack
?</a>
</dt>
<dt>
3.1.10. <a href="ch03.html#id4785685">What is Event_Dispatcher
?</a>
</dt>
</dl>
</dd>
<dt>
3.2. <a href="ch03.html#id4785734">Troubleshooting guide</a>
</dt>
<dd>
<dl>
<dt>
3.2.1. <a href="ch03.html#id4785738">I saw nothing on my
browser screen</a>
</dt>
<dt>
3.2.2. <a href="ch03.html#id4785796">The progress meter is
running, but I see no changes</a>
</dt>
<dt>
3.2.3. <a href="ch03.html#id4785866">The progress meter seems
to be frozen at 100%, I see no changes</a>
</dt>
</dl>
</dd>
<dt>
3.3. <a href="ch03.html#id4785961">How to</a>
</dt>
<dd>
<dl>
<dt>
3.3.1. <a href="ch03.html#id4785966">How to include a progress
meter in my upload form ?</a>
</dt>
<dt>
3.3.2. <a href="ch03.html#id4786154">How to implement an AJAX
Progress Bar ?</a>
</dt>
</dl>
</dd>
</dl>
<table border="0" summary="Q and A Set">
<col class="c1" width="1%" />
<tbody>
<tr class="qandadiv">
<td align="left" valign="top" colspan="2">
<h3 class="title">
<a name="id4783253"></a>3.1. General questions
</h3>
</td>
</tr>
<tr class="toc">
<td align="left" valign="top" colspan="2">
<dl>
<dt>
3.1.1. <a href="ch03.html#id4783258">What does it cost
?</a>
</dt>
<dt>
3.1.2. <a href="ch03.html#id4783224">Do you offer support
?</a>
</dt>
<dt>
3.1.3. <a href="ch03.html#id4782906">I found a bug, what
shall i do ?</a>
</dt>
<dt>
3.1.4. <a href="ch03.html#id4785402">What is
HTML_Progress2_Lite ?</a>
</dt>
<dt>
3.1.5. <a href="ch03.html#id4785436">What is PHP_Compat
?</a>
</dt>
<dt>
3.1.6. <a href="ch03.html#id4785471">What is HTML_QuickForm
?</a>
</dt>
<dt>
3.1.7. <a href="ch03.html#id4785526">What is
HTML_QuickForm_Controller ?</a>
</dt>
<dt>
3.1.8. <a href="ch03.html#id4785580">What is PEAR ?</a>
</dt>
<dt>
3.1.9. <a href="ch03.html#id4785642">What is
PEAR_ErrorStack ?</a>
</dt>
<dt>
3.1.10. <a href="ch03.html#id4785685">What is
Event_Dispatcher ?</a>
</dt>
</dl>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4783258"></a><a name="id4783260"></a><b>3.1.1.</b>
</td>
<td align="left" valign="top">
<p>
What does it cost ?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
You can download and use it for free. But don't delete the
copyright notice. You can read terms of the <a class=
"external" href=
"http://www.laurent-laville.org/index.php?mod=pear&des=progress2&act=license"
title=
"http://www.laurent-laville.org/index.php?mod=pear&des=progress2&act=license">
license</a>
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4783224"></a><a name="id4783227"></a><b>3.1.2.</b>
</td>
<td align="left" valign="top">
<p>
Do you offer support ?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
YES if there is no answer in this Guide and if you are ready
to share some informations such as : your configuration
(platform Win *nix mac, PHP version, PEAR packages installed)
and perharps your script.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4782906"></a><a name="id4782908"></a><b>3.1.3.</b>
</td>
<td align="left" valign="top">
<p>
I found a bug, what shall i do ?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
You can report it with the bug tracker at <a class="external"
href="http://pear.php.net/package/HTML_Progress2/bugs" title=
"http://pear.php.net/package/HTML_Progress2/bugs">PEAR</a>.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4785402"></a><a name="id4785404"></a><b>3.1.4.</b>
</td>
<td align="left" valign="top">
<p>
What is HTML_Progress2_Lite ?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
<span class=
"bold"><strong>HTML_Progress2_Lite</strong></span> is less
customizable than its father HTML_Progress2, but allows to do
almost the same things. This class has no dependency and can
be used completely outside the <span class=
"bold"><strong>PEAR</strong></span> infrastructure.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4785436"></a><a name="id4785438"></a><b>3.1.5.</b>
</td>
<td align="left" valign="top">
<p>
What is PHP_Compat ?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
<span class="bold"><strong>PHP_Compat</strong></span>
provides missing functionality for older versions of PHP.
This class has no dependency and can be used completely
outside the <span class="bold"><strong>PEAR</strong></span>
infrastructure.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4785471"></a><a name="id4785474"></a><b>3.1.6.</b>
</td>
<td align="left" valign="top">
<p>
What is HTML_QuickForm ?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
<span class="bold"><strong>HTML_QuickForm</strong></span> is
a PEAR package that provides methods for creating, validating
and processing HTML forms.
</p>
<p>
The purpose of <a class="external" href=
"http://www.thelinuxconsultancy.co.uk/quickform.php" title=
"http://www.thelinuxconsultancy.co.uk/quickform.php">Keith
Edmunds</a> tutorial is to give the new users of QuickForm an
overview of its features and usage patterns. It describes a
small subset of available functionality.
</p>
<p>
Don't forget to read also the PEAR Manual, <a class=
"external" href=
"http://pear.php.net/manual/en/package.html.html-quickform.php"
title=
"http://pear.php.net/manual/en/package.html.html-quickform.php">
HTML_QuickForm</a> related part.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4785526"></a><a name="id4785528"></a><b>3.1.7.</b>
</td>
<td align="left" valign="top">
<p>
What is HTML_QuickForm_Controller ?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
<span class=
"bold"><strong>HTML_QuickForm_Controller</strong></span> is a
PEAR package that implements a PageController design pattern,
which essentially means that there is a single page
processing requests and actions this page performs.
</p>
<p>
This package is used only with the <span class=
"bold"><strong>HTML_Progress2_Generator</strong></span> (an
interactive tools to create your own progress meter).
</p>
<p>
Don't forget to read also the PEAR Manual, <a class=
"external" href=
"http://pear.php.net/manual/en/package.html.html-quickform-controller.php"
title=
"http://pear.php.net/manual/en/package.html.html-quickform-controller.php">
HTML_QuickForm_Controller</a> related part.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4785580"></a><a name="id4785583"></a><b>3.1.8.</b>
</td>
<td align="left" valign="top">
<p>
What is PEAR ?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
PEAR (an acronym for <span class=
"bold"><strong>P</strong></span>HP <span class=
"bold"><strong>E</strong></span>xtension and <span class=
"bold"><strong>A</strong></span>pplication <span class=
"bold"><strong>R</strong></span>epository) is a framework and
distribution system for reusable PHP components.
</p>
<p>
Don't forget to read also the <a class="external" href=
"http://pear.php.net/manual/en" title=
"http://pear.php.net/manual/en">PEAR Manual</a> and <a class=
"external" href="http://pear.php.net/manual/en/faq.php"
title="http://pear.php.net/manual/en/faq.php">PEAR FAQ</a>.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4785642"></a><a name="id4785644"></a><b>3.1.9.</b>
</td>
<td align="left" valign="top">
<p>
What is PEAR_ErrorStack ?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
<span class="bold"><strong>PEAR_ErrorStack</strong></span>
implements error raising and handling using a stack pattern.
This has tremendous advantages over the PEAR_Error
Implementation.
</p>
<p>
Don't forget to read also the PEAR Manual, <a class=
"external" href=
"http://pear.php.net/manual/en/core.pear.pear-errorstack.php"
title=
"http://pear.php.net/manual/en/core.pear.pear-errorstack.php">
PEAR_ErrorStack</a> related part.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4785685"></a><a name="id4785687"></a><b>3.1.10.</b>
</td>
<td align="left" valign="top">
<p>
What is Event_Dispatcher ?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
<span class="bold"><strong>Event_Dispatcher</strong></span>
is a PEAR package that acts as a notification dispatch table.
It is used to notify other objects of interesting things.
</p>
<p>
Event_Dispatcher is used to allow observers to hook into the
progress meter process. Whenever a progress bar value
changes, a notification onChange is sent. Others notification
events are available: onSubmit, onLoad, and onCancel (for
monitor only).
</p>
<p>
Don't forget to read also the PEAR Manual, <a class=
"external" href=
"http://pear.php.net/manual/en/package.event.event-dispatcher.php"
title=
"http://pear.php.net/manual/en/package.event.event-dispatcher.php">
Event_Dispatcher</a> related part.
</p>
</td>
</tr>
<tr class="qandadiv">
<td align="left" valign="top" colspan="2">
<h3 class="title">
<a name="id4785734"></a>3.2. Troubleshooting guide
</h3>
</td>
</tr>
<tr class="toc">
<td align="left" valign="top" colspan="2">
<dl>
<dt>
3.2.1. <a href="ch03.html#id4785738">I saw nothing on my
browser screen</a>
</dt>
<dt>
3.2.2. <a href="ch03.html#id4785796">The progress meter is
running, but I see no changes</a>
</dt>
<dt>
3.2.3. <a href="ch03.html#id4785866">The progress meter
seems to be frozen at 100%, I see no changes</a>
</dt>
</dl>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4785738"></a><a name="id4785741"></a><b>3.2.1.</b>
</td>
<td align="left" valign="top">
<p>
I saw nothing on my browser screen
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
You've forgot to put the necessary styles (CSS) on your HTML
document. Add the <code class="methodname">getStyle()</code>
method.
</p>
<p>
Either with the style tags :
</p>
<div class="php c2">
<ol>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw1">require_once</span> <span class=
"st0">'HTML/Progress2.php'</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span> <span class="sy0">=</span>
<span class="kw2">new</span> HTML_Progress2<span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2">?></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>style type<span class=
"sy0">=</span><span class=
"st0">"text/css"</span><span class="sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><!--</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span> <span class=
"kw3">echo</span> <span class=
"re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">getStyle</span><span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span> <span class="kw2">?></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0">--></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"></</span>style<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">display</span><span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2">?></span>
</div>
</li>
</ol>
</div>
<p>
Or without the style tags :
</p>
<div class="php c2">
<ol>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw1">require_once</span> <span class=
"st0">'HTML/Progress2.php'</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span> <span class="sy0">=</span>
<span class="kw2">new</span> HTML_Progress2<span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw3">echo</span> <span class=
"re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">getStyle</span><span class=
"br0">(</span><span class=
"kw2">false</span><span class="br0">)</span><span class="sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">display</span><span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2">?></span>
</div>
</li>
</ol>
</div>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4785796"></a><a name="id4785798"></a><b>3.2.2.</b>
</td>
<td align="left" valign="top">
<p>
The progress meter is running, but I see no changes
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
The waiting bar of your favorite browser is running, but you
don't see anything on the screen. You've forgot to put the
necessary javascript code that manage the progress meter. Add
the <code class="methodname">getStcript()</code> method.
</p>
<p>
Either with the script tags :
</p>
<div class="php c2">
<ol>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw1">require_once</span> <span class=
"st0">'HTML/Progress2.php'</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span> <span class="sy0">=</span>
<span class="kw2">new</span> HTML_Progress2<span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">setAnimSpeed</span><span class=
"br0">(</span><span class="nu0">100</span><span class=
"br0">)</span><span class="sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2">?></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><!</span>DOCTYPE html <span class=
"kw2">PUBLIC</span> <span class="st0">"-//W3C//DTD
XHTML 1.0 Strict//EN"</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class=
"st0">"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"</span><span class="sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>html xmlns<span class=
"sy0">=</span><span class=
"st0">"http://www.w3.org/1999/xhtml"</span>
xml<span class="sy0">:</span>lang<span class=
"sy0">=</span><span class="st0">"en"</span><span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>head<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>title<span class=
"sy0">></span>Progress2 Basic example<span class=
"sy0"></</span>title<span class="sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>style type<span class=
"sy0">=</span><span class=
"st0">"text/css"</span><span class="sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><!--</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span> <span class=
"kw3">echo</span> <span class=
"re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">getStyle</span><span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span> <span class="kw2">?></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0">--></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"></</span>style<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>script type<span class=
"sy0">=</span><span class=
"st0">"text/javascript"</span><span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><!--</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span> <span class=
"kw3">echo</span> <span class=
"re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">getScript</span><span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span> <span class="kw2">?></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="co1">//--></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2"></script></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"></</span>head<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>body<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">display</span><span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">run</span><span class="br0">(</span><span class=
"br0">)</span><span class="sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2">?></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"></</span>body<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"></</span>html<span class=
"sy0">></span>
</div>
</li>
</ol>
</div>
<p>
Or without the script tags :
</p>
<div class="php c2">
<ol>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw1">require_once</span> <span class=
"st0">'HTML/Progress2.php'</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span> <span class="sy0">=</span>
<span class="kw2">new</span> HTML_Progress2<span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">setAnimSpeed</span><span class=
"br0">(</span><span class="nu0">100</span><span class=
"br0">)</span><span class="sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2">?></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><!</span>DOCTYPE html <span class=
"kw2">PUBLIC</span> <span class="st0">"-//W3C//DTD
XHTML 1.0 Strict//EN"</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class=
"st0">"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"</span><span class="sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>html xmlns<span class=
"sy0">=</span><span class=
"st0">"http://www.w3.org/1999/xhtml"</span>
xml<span class="sy0">:</span>lang<span class=
"sy0">=</span><span class="st0">"en"</span><span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>head<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>title<span class=
"sy0">></span>Progress2 Basic example<span class=
"sy0"></</span>title<span class="sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw3">echo</span> <span class=
"re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">getStyle</span><span class=
"br0">(</span><span class=
"kw2">false</span><span class="br0">)</span><span class="sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw3">echo</span> <span class=
"re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">getScript</span><span class=
"br0">(</span><span class=
"kw2">false</span><span class="br0">)</span><span class="sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2">?></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"></</span>head<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>body<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">display</span><span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">run</span><span class="br0">(</span><span class=
"br0">)</span><span class="sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2">?></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"></</span>body<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"></</span>html<span class=
"sy0">></span>
</div>
</li>
</ol>
</div>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4785866"></a><a name="id4785869"></a><b>3.2.3.</b>
</td>
<td align="left" valign="top">
<p>
The progress meter seems to be frozen at 100%, I see no
changes
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
Using <code class="methodname">run()</code> method rather
than coding a loop as in above example, you've forgot to give
a delay to progress animation. Because it's not necessary in
real world, almost all cases, the delay is fixed at zero
(default behavior). Use the <code class=
"methodname">setAnimSpeed()</code> method to set the delay
from 1 to 1000 milliseconds. In example below delay is only
0.5 second.
</p>
<div class="php c2">
<ol>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw1">require_once</span> <span class=
"st0">'HTML/Progress2.php'</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span> <span class="sy0">=</span>
<span class="kw2">new</span> HTML_Progress2<span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">setAnimSpeed</span><span class=
"br0">(</span><span class="nu0">500</span><span class=
"br0">)</span><span class="sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2">?></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>html<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>head<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw3">echo</span> <span class=
"re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">getStyle</span><span class=
"br0">(</span><span class=
"kw2">false</span><span class="br0">)</span><span class="sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw3">echo</span> <span class=
"re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">getScript</span><span class=
"br0">(</span><span class=
"kw2">false</span><span class="br0">)</span><span class="sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2">?></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"></</span>head<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"><</span>body<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2"><?php</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">display</span><span class=
"br0">(</span><span class="br0">)</span><span class=
"sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="re1">$pb</span><span class=
"sy0">-></span><span class=
"me1">run</span><span class="br0">(</span><span class=
"br0">)</span><span class="sy0">;</span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="kw2">?></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"></</span>body<span class=
"sy0">></span>
</div>
</li>
<li class="li1">
<div class="de1">
<span class="sy0"></</span>html<span class=
"sy0">></span>
</div>
</li>
</ol>
</div>
<p>
Another possible reason is due to your firewall or anti-virus
software. Check-out if the web content protection is active
or not. If is set to true, try to de-activate it and see if
you have still the problem.
</p>
<div class="note c3">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="48">
<img alt="[Note]" src="img/admons/note.png" />
</td>
<th align="left">
Note
</th>
</tr>
<tr>
<td align="left" valign="top">
Thanks to Mathieu GRELIER for his feedback on
anti-virus software problem : Progress2 (and PHP flush
function) is not compatible with real-time web parsing
softwares.
</td>
</tr>
</table>
</div>
<div class="tip c3">
<table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top" width="48">
<img alt="[Tip]" src="img/admons/tip.png" />
</td>
<th align="left">
Tip
</th>
</tr>
<tr>
<td align="left" valign="top">
With Kaspersky Anti-Virus 6, look in configuration
panel, network port control, and de-activate the
http-standard port 80.
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr class="qandadiv">
<td align="left" valign="top" colspan="2">
<h3 class="title">
<a name="id4785961"></a>3.3. How to
</h3>
</td>
</tr>
<tr class="toc">
<td align="left" valign="top" colspan="2">
<dl>
<dt>
3.3.1. <a href="ch03.html#id4785966">How to include a
progress meter in my upload form ?</a>
</dt>
<dt>
3.3.2. <a href="ch03.html#id4786154">How to implement an
AJAX Progress Bar ?</a>
</dt>
</dl>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4785966"></a><a name="id4785968"></a><b>3.3.1.</b>
</td>
<td align="left" valign="top">
<p>
How to include a progress meter in my upload form ?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
Before AJAX it was impossible to do with a pure PHP solution.
By the way, there are some mixed solutions that exists on the
Web. Here is a short list :
</p>
<div class="variablelist">
<dl>
<dt>
<span class="term"><a class="external" href=
"http://jupload.biz/" title=
"http://jupload.biz/">http://jupload.biz/</a></span>
</dt>
<dd>
<p>
<span class="bold"><strong>JUpload</strong></span> is
an easy to use java applet for uploading multiple files
to the webserver using the post method of html forms as
described in RFC 1867.
</p>
</dd>
</dl>
</div>
<div class="variablelist">
<dl>
<dt>
<span class="term"><a class="external" href=
"http://www.aspupload.com/" title=
"http://www.aspupload.com/">http://www.aspupload.com/</a></span>
</dt>
<dd>
<p>
<span class="bold"><strong>AspUpload</strong></span> is
a COM+ component which enables an ASP application to
capture, save and process files uploaded to the web
server with a browser.
</p>
</dd>
</dl>
</div>
<div class="variablelist">
<dl>
<dt>
<span class="term"><a class="external" href=
"http://www.raditha.com/php/progress.php" title=
"http://www.raditha.com/php/progress.php">http://www.raditha.com/php/progress.php</a></span>
</dt>
<dd>
<p>
<span class="bold"><strong>Mega Upload</strong></span>
is a file uploader with a progress monitor. There are
three separate editions for the three most popular web
programming languages PHP/Perl/JSP.
</p>
</dd>
</dl>
</div>
<div class="variablelist">
<dl>
<dt>
<span class="term"><a class="external" href=
"http://pdoru.from.ro/" title=
"http://pdoru.from.ro/">http://pdoru.from.ro/</a></span>
</dt>
<dd>
<p>
<span class="bold"><strong>Upload Progress
Meter</strong></span> is a patch for PHP4 or PHP5.
</p>
</dd>
</dl>
</div>
<p>
Now with AJAX, and some PHP extension (like APC with PHP
5.2+, or PECL <a class="external" href=
"http://pecl.php.net/package/uploadprogress" title=
"http://pecl.php.net/package/uploadprogress">uploadprogress</a>)
that used the RFC1867 hook to track progress of file upload,
dream begin a reality !
</p>
<p>
See chapter <a href="ch11.html" title=
"Chapter 11. How to to implement an AJAX Upload with Progress Bar solution ">
How to to implement an AJAX Upload with Progress Bar
solution</a> to learn more.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="id4786154"></a><a name="id4786156"></a><b>3.3.2.</b>
</td>
<td align="left" valign="top">
<p>
How to implement an AJAX Progress Bar ?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td>
<td align="left" valign="top">
<p>
Since release 2.3.0, there was an existing text file included
into distribution named <code class=
"filename">HOWTO_AJAX.txt</code>. Content of this file is now
integrated into this guide. Read chapter <a href="ch10.html"
title=
"Chapter 10. How to to implement an AJAX Progress Bar">
How to to implement an AJAX Progress Bar</a> to learn more.
</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<table class="progress2Footer">
<tr>
<td align="left">
HTML_Progress2 : The Definitive Guide
</td>
<td align="right">
v 2.4.0 : April 20, 2007
</td>
</tr>
</table>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="ch02s05.html">Prev</a>
</td>
<td width="20%" align="center">
<a accesskey="u" href="pt01.html">Up</a>
</td>
<td width="40%" align="right">
<a accesskey="n" href="pt02.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">
Version 2.4.x
</td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top">
Part II. Getting Started
</td>
</tr>
</table>
</div>
</body>
</html>