Re: Upload button Enable

  •  08-14-2012, 7:55 AM

    Re: Upload button Enable

    Hi kalees1980,
     
    Please try the example below, it shows you how to achieve your requirement.
     
    1. <%@ Page Language="C#"  %>  
    2.   
    3. <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">  
    5. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head id="Head1" runat="server">  
    7. </head>  
    8. <body>  
    9.     <form id="Form1" runat="server">  
    10.         <CuteWebUI:UploadAttachments ID="uploader1" runat="server" InsertText="uploader1">  
    11.         </CuteWebUI:UploadAttachments>  
    12.          <CuteWebUI:UploadAttachments ID="uploader2" runat="server" InsertText="uploader2">  
    13.         </CuteWebUI:UploadAttachments>  
    14.     </form>  
    15. </body>  
    16. </html>  
    17.   
    18. <script>  
    19. var uploader1=document.getElementById("<%= uploader1.ClientID %>");  
    20. var uploader2=document.getElementById("<%= uploader2.ClientID %>");  
    21. function CuteWebUI_AjaxUploader_OnStart()  
    22. {  
    23.     var hidden=this;  
    24.     if(hidden.id=="uploader1")  
    25.     {  
    26.         //if upload1 uploading,disable uploader2  
    27.         uploader2.internalobject.insertBtn.disabled="disabled";  
    28.     }  
    29.     else  
    30.     {  
    31.         //if upload2 uploading,disable uploader2  
    32.         uploader1.internalobject.insertBtn.disabled="disabled";  
    33.     }  
    34. }  
    35. </script>  
    Regards,
     
    Ken 
     
View Complete Thread