How do I customise the Cancel All button

Last post 07-12-2010, 3:03 PM by Eric. 1 replies.
Sort Posts: Previous Next
  •  07-05-2010, 7:35 PM 62297

    How do I customise the Cancel All button

    I have customised the Upload and the Cancel Upload button but I cannot find the id to customise the Cancel All Uploads button that appears during the upload...
    Filed under: ,
  •  07-12-2010, 3:03 PM 62436 in reply to 62297

    Re: How do I customise the Cancel All button

    Please try the following code:
     

    <?php require_once "phpuploader/include_phpuploader.php" ?>
    <?php session_start(); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>PHP Upload - Selecting multiple files for upload</title>
    <link href="demo.css" rel="stylesheet" type="text/css" />

    <style>
    .AjaxUploaderCancelAllButton {
     display: none !important;
    }
    </style>
    </head>
    <body>
    <div class="demo">
    <h2>Selecting multiple files for upload</h2>
    <p>Select multiple files in the file browser dialog then upload them at
    once (Allowed file types: <span style="color: red">jpg, gif, png, zip</span>).
    </ul>
    <?php
    $uploader=new PhpUploader();
    $uploader->MultipleFilesUpload=true;
    $uploader->InsertText="Upload Multiple File (Max 10M)";
    $uploader->Name="myuploader";
    $uploader->MaxSizeKB=1024000;
    $uploader->AllowedFileExtensions="jpeg,jpg,gif,png,zip";
    $uploader->Render();
    ?> <br />
    <button id="cancelallbtn" style='display: none;color:red;' onclick="CancelAll();return false;">Cancel All</button>
    </div>

    <script type="text/javascript">
        function CuteWebUI_AjaxUploader_OnQueueUI(list)  
        {  
            var cancelallbtn=document.getElementById("cancelallbtn");
             if(list.length<2)
            {  
              cancelallbtn.style.display="none";  
                return;  
            }  
             cancelallbtn.style.display=""; 
        }
        function CuteWebUI_AjaxUploader_OnTaskComplete(task)
     {
      var div=document.createElement("DIV");
      div.innerHTML=task.FileName + " is uploaded!";
      document.body.appendChild(div);
     }
        function CancelAll()
     {
         var uploader=document.getElementById('myuploader');
         uploader.cancelall();  
     }
       </script>
    </body>
    </html>

     
    Regards,
    Eric
View as RSS news feed in XML