Re: Set properties of que list when uploading manually

  •  03-10-2009, 10:30 PM

    Re: Set properties of que list when uploading manually

    b-man,
     
    You can't change the position of the buildin cancelall button.
     
    Here is an example to make another button :
     
     

     
     
    1. <%@ Page Language="C#" %>  
    2. <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>  
    3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    4. <html xmlns="http://www.w3.org/1999/xhtml">  
    5. <head runat="server">  
    6.     <title>Sample</title>  
    7.     <style>  
    8.     .AjaxUploaderCancelAllButton   
    9.     {   
    10.         display:none!important;   
    11.     }   
    12.     </style>  
    13.     <script type="text/javascript">  
    14.     function CuteWebUI_AjaxUploader_OnQueueUI(list)   
    15.     {   
    16.         var mycancelall=document.getElementById("mycancelall");   
    17.         if(list.length<2)   
    18.         {   
    19.             mycancelall.style.display="none";   
    20.             return;   
    21.         }   
    22.         mycancelall.style.display="";   
    23.     }   
    24.     function DoCancelAll()   
    25.     {   
    26.         var uploader=document.getElementById('<%=UploadAttachments1.ClientID %>');   
    27.         uploader.cancelall();   
    28.     }   
    29.     </script>  
    30. </head>  
    31. <body>  
    32.     <form id="form1" runat="server">  
    33.         <div>  
    34.             <CuteWebUI:UploadAttachments runat="server" ID="UploadAttachments1" />  
    35.             <hr />  
    36.             <asp:Button runat=server ID=BtnSubmit Text="MySubmit" />  
    37.             <button id="mycancelall" onclick="DoCancelAll();return false;" style="display:none">Cancel All Uploads</button>  
    38.         </div>  
    39.     </form>  
    40. </body>  
    41. </html>  
    Regards,
    Terry
View Complete Thread