Create a custom progress bar panel -- PHP File Upload

php Uploader

PHP File Uploader

Create a custom progress bar panel

There are 4 simple steps to create a custom progress bar panel:

  1. Create a panel control which will be used as custom progress bar panel.
  2. Create a label control inside panel control. This label control will be used as custom progress text label.
  3. Use the ProgressCtrlID property to specify the ID of panel control.
  4. Use the ProgressTextID property to specify the ID of progress text label.

Example:

  1. //Step 1: Register Uploader component to your page   
  2. <?php require_once "phpuploader/include_phpuploader.php" ?>   
  3. <html>   
  4. <body>   
  5.         <form id="form1" method="POST">   
  6.             <?php   
  7.                 //Step 2: Create Uploader object.   
  8.                 $uploader=new PhpUploader();   
  9.                 //Step 3: Set a unique name to Uploader   
  10.                 $uploader->Name="myuploader";    
  11.                 //Step 4: Specify the ID of the control that will be used as progress bar panel.   
  12.                 $uploader->ProgressCtrlID="uploaderprogresspanel";   
  13.                 //Step 4: Specify the ID of the control that will be used as progress text label.   
  14.                 $uploader->ProgressTextID="uploaderprogresstext";   
  15.                 //Step 5: Render Uploader   
  16.                 $uploader->Render();   
  17.             ?>   
  18.             <div id="uploaderprogresspanel" style='display:none;background-color:orange;border:dashed 2px gray;padding:4px;' BorderColor="Orange" BorderStyle="dashed">   
  19.                 <span id="uploaderprogresstext" style='color:firebrick'></span>   
  20.             </div>   
  21.         </form>   
  22. </body>   
  23. </html>