There are two simple steps to create a custom cancel button:
- Create a HTML button or image button which will be used as custom cancel button.
- Use the CancelButtonID property to specify the ID of the control that will be used as the cancel button.
Example:
- //Step 1: Register Uploader component to your page
- <?php require_once "phpuploader/include_phpuploader.php" ?>
- <html>
- <body>
- <form id="form1" method="POST">
- <?php
- //Step 2: Create Uploader object.
- $uploader=new PhpUploader();
- //Step 3: Set a unique name to Uploader
- $uploader->Name="myuploader";
- //Step 4: Specify ID of the control that will be used as cancel button.
- $uploader->CancelButtonID="cancelbutton";
- //Step 5: Render Uploader
- $uploader->Render();
- ?>
- <img id="uploadercancelbutton" style='display:none;' alt="Cancel" src="sampleimages/cancel_button.gif" />
- </form>
- </body>
- </html>