Re: Disabling/Enabling Server side button following file attachment

  •  09-27-2010, 3:22 AM

    Re: Disabling/Enabling Server side button following file attachment

    Hi ssoutrs,
     
    Try this example
     
    1. <%@ Page Language="C#" %>   
    2.   
    3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
    4.   
    5.   
    6. <html xmlns="http://www.w3.org/1999/xhtml">   
    7. <head runat="server">   
    8.     <title>Untitled Page</title>   
    9. </head>   
    10. <body>   
    11.     <form id="form1" runat="server">   
    12.         <div>   
    13.             <CuteWebUI:UploadAttachments runat="server" ManualStartUpload="true" ID="Uploader1"  
    14.                 InsertText="Browse Files">   
    15.             </CuteWebUI:UploadAttachments><br />   
    16.             <input type="button" value="Upload" onclick="submitUpload()" disabled="disabled" id="startUpload" />   
    17.         </div>   
    18.     </form>   
    19. </body>   
    20. </html>   
    21.   
    22. <script>   
    23. function submitUpload()   
    24. {   
    25.     var uploader1=document.getElementById("<%= Uploader1.ClientID %>");   
    26.     uploader1.startupload();   
    27. }   
    28. function CuteWebUI_AjaxUploader_OnSelect(files)   
    29.   
    30. {   
    31.   
    32. var startUpload=document.getElementById("startUpload");   
    33. startUpload.disabled="";   
    34.   
    35. }   
    36.   
    37. </script>  
    Regards,
     
    ken
View Complete Thread