[CLOSED] How to show and Hide mask while saving file to local?

  1. #1

    [CLOSED] How to show and Hide mask while saving file to local?

    Hi,

    As per requirement, I have to compile two to three files and download that compiled file to local machine. While doing this I have to show mask and needs to hide after complete the process. I have implemented small example as given below. The path of compiled file is given directly. Please replace it with your file local path and run it. While clicking on "Save to Local" the mask is showing up, but not hiding.
    Can you please let me know how to implement the mask for this?

    
    <%@ Page Language="VB" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <script runat="server">
        Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
            
        End Sub
        
        Public Sub SaveToLocal(ByVal sender As Object, ByVal e As DirectEventArgs)
            Dim sMergeFile As String = "C:\TempDir\DocToPDF.pdf"
            Response.ContentType = "application/pdf"
            Response.AppendHeader("Content-Disposition", "attachment; filename=ImageInfo.pdf")
            Response.TransmitFile(sMergeFile)
            Response.End()
        End Sub
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="resMngr" runat="server" />
        <ext:Button ID="btnDownload" runat="server" Text="Save To Local">
            <DirectEvents>
                <Click OnEvent="SaveToLocal"  IsUpload="true">
                    <EventMask ShowMask="true" Msg="Saving..." MinDelay="1000" />
                </Click>
            </DirectEvents>
        </ext:Button>
        </form>
    </body>
    </html>
    Last edited by Daniil; Apr 23, 2013 at 12:27 PM. Reason: [CLOSED]
  2. #2
    Hi @rnachman,

    This is the limitation of AJAX downloading - no success/failure events. So, it's impossible to hide after downloading. There is no way to avoid it.

    If masking is required, when you should look into, for example, downloading via Flash.

    Maybe, this can help.
    http://forums.ext.net/showthread.php?19430#post83757
  3. #3
    Hi Daniil,

    Thank you, I have implemented the way you describe. You can close this thread.

Similar Threads

  1. How to hide mask for GridPanel
    By devil in forum 2.x Help
    Replies: 4
    Last Post: Feb 13, 2013, 2:35 PM
  2. Replies: 0
    Last Post: Aug 17, 2012, 7:54 AM
  3. [CLOSED] load local file clientside
    By yobnet in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 01, 2010, 4:34 PM
  4. [CLOSED] The translation does not work using .net local file resources?
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Feb 11, 2010, 3:45 PM
  5. panel with LoadMask on local file
    By jmilton in forum 1.x Help
    Replies: 7
    Last Post: Apr 03, 2009, 11:09 AM

Tags for this Thread

Posting Permissions