Re: "Wait to finish upload" message if some one do another activity during upload is in progress

  •  03-12-2013, 12:05 PM

    Re: "Wait to finish upload" message if some one do another activity during upload is in progress

    Hi krajiv23,

     

    The uploader has not the property to check the states, so you can add a  variable to check it between the upload progress, like the example below.

     

    1. <%@ Page Language="C#" %>  
    2.   
    3. <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>  
    4. <!DOCTYPE html>  
    5.   
    6. <html xmlns="http://www.w3.org/1999/xhtml">  
    7. <head runat="server">  
    8.     <title>example</title>  
    9. </head>  
    10. <body>  
    11.     <form id="form1" runat="server">  
    12.         <div>  
    13.             <CuteWebUI:Uploader runat="server" ID="uploader1" >  
    14.             </CuteWebUI:Uploader>  
    15.             <asp:Button ID="btnPostBack" runat="server" Text="post back" OnClientClick="return postback()" />  
    16.         </div>  
    17.     </form>  
    18. </body>  
    19. </html>  
    20.   
    21. <script type="text/javascript">  
    22.     var finish=null;  
    23.     function CuteWebUI_AjaxUploader_OnStart()  
    24.     {  
    25.         finish=false;  
    26.     }  
    27.     function CuteWebUI_AjaxUploader_OnTaskComplete(task)  
    28.     {  
    29.         finish=true;  
    30.     }  
    31.     function postback()  
    32.     {  
    33.         if(finish==false)  
    34.         {  
    35.             alert("wait upload is in progress.");  
    36.             return false;  
    37.         }  
    38.     }  
    39. </script>  
     

    Regards,

     

    Ken 

View Complete Thread