[CLOSED] Bug when open window, loading mask hangs

  1. #1

    [CLOSED] Bug when open window, loading mask hangs

    Hi
    I found a bug I really need help to fix. Please try this example, (IE7).
    The way to make the bug appear is like this.
    1. Click "Open window .NET"
    2. Close the window
    3. Click "Open window JS"
    4. Close the window
    5. Click "Open window .NET" again
    Now the loading mask has "frozen" in the frame.

    /Mikael

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" 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 void Page_Load(object sender, EventArgs e)
        {
    
    
        }
    
    
        public void LoadExtIFrameWindow(Coolite.Ext.Web.Window wndWindow, string strUrl, string strTitle, string strMaskMsg, string strIcon, int intWidth, int intHeight, string strBodyStyle)
        {
            wndwindow.Title = strTitle;
            if (strBodyStyle == "")
                strBodyStyle = "padding:0px;";
            wndwindow.BodyStyle = strBodyStyle;
            wndwindow.IconCls = strIcon;
            wndwindow.SetSize(intWidth, intHeight);
            wndwindow.AutoLoad.ShowMask = true;
            wndwindow.AutoLoad.MaskMsg = strMaskMsg;
            wndwindow.AutoLoad.Url = strUrl;
            wndwindow.AutoLoad.Mode = Coolite.Ext.Web.LoadMode.IFrame;
            wndwindow.Show();
            wndwindow.Load();
    
    
        }   
    
    
        protected void btnTest_click(object sender, AjaxEventArgs e)
        {
            LoadExtIFrameWindow(wndInfo, "http://www.google.se", "Google .NET", "", "", 400, 400, "");
        }
    </script>
    
    
    <script type="text/javascript">
        function loadWindowGeneral(wndPopupVar, url, title, width, height, iconClass) {
            try {
                wndPopupVar.setHeight(height);
                wndPopupVar.setWidth(width);
                var html = String.format("<iframe width=\"100%\" id=\"Window1_iframe\" height=\"100%\" src=\"{0}\" frameborder=\"0\"></iframe>", url)
                wndPopupVar.body.update(html);
                wndPopupVar.setTitle(title);
                wndPopupVar.maximizable = true;
                wndPopupVar.bodyBorder = false;
                wndPopupVar.border = false;
                wndPopupVar.plain = true;
                wndPopupVar.show();
                if (iconClass != "")
                    wndPopupVar.setIconClass(iconClass);
            }
            catch (e) {
                Ext.Msg.alert('Error', e.message);
            }
        }
    </script>
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
    
    
    <ext:Label runat="server" ID="TEST"></ext:Label>
    
    
        <form id="form1" runat="server">
        
               
        <ext:ScriptManager runat="server" ID="ScriptManager1"></ext:ScriptManager>
    
    
        Open window JS
    
    
        <ext:Button runat="server" ID="btnTest" Text="Open window .NET" >
        <AjaxEvents><Click OnEvent="btnTest_click"></Click></AjaxEvents>
        </ext:Button>
    
    
    
        <ext:Window Border="false" Center&#111;nload="true"  ID="wndInfo" Maximizable="true"  Modal="false" runat="server" Show&#111;nload="false" Collapsible="false"  >
        </ext:Window>
        
    
        </form>
    </body>
    </html>
  2. #2

    RE: [CLOSED] Bug when open window, loading mask hangs

    Can someone please look at this, I need this to work. If you dont have time I can recode all to javascript, I sure that will work.

    Thanks

    /Mikael
  3. #3

    RE: [CLOSED] Bug when open window, loading mask hangs

    Hi Mikael,

    Just when you call javascript function you remove iframe from body (when update html) but don't remove iframe field inside window.

    Please add in begin of js function
    wndPopupVar.clearLoadedContent();
    Also it is not working after rendering
    wndPopupVar.maximizable = true;
                wndPopupVar.bodyBorder = false;
                wndPopupVar.border = false;
                wndPopupVar.plain = true;
    So, you can remove it.

    It is better to use standart client API for load new page using load/reload function

    window.load({url:'page.aspx', mode:'iframe'});
  4. #4

    RE: [CLOSED] Bug when open window, loading mask hangs

    Thanks for the help, works great.
    /Mikael
  5. #5

    Mask Fails

    If Iframe output an file. the mask hangs

    Response.ContentType = "application/pdf";
    Response.AddHeader("Content-Disposition", "attachment;filename=test.pdf");
    Response.WriteFile("test.pdf");
    for example if you have the following code in iframe the portlet mask will hang after the file delivered to client
    Last edited by Daniil; Oct 14, 2011 at 10:44 AM. Reason: Please use [CODE] tags
  6. #6
    It's a limitation of ajax file downloading - success/failure events are not fired.

    So, a mask is not hidden.
  7. #7

    mask hangs

    Quote Originally Posted by Daniil View Post
    It's a limitation of ajax file downloading - success/failure events are not fired.

    So, a mask is not hidden.
    Thanks for reply. So what options do we have ?? My current work around for this is not displaying the MASK
  8. #8
    Unfortunately, no options except an other download mechanism, for example, basing on Flash.
  9. #9
    Quote Originally Posted by Daniil View Post
    Unfortunately, no options except an other download mechanism, for example, basing on Flash.
    I have seen the solution for colfusion platform but I am not sure. Let me clarify and I will be back

Similar Threads

  1. [CLOSED] Window Loading Mask v2.0rc1
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Jun 22, 2012, 10:46 AM
  2. [CLOSED] Loading data in store take too long. browser hangs.
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 21
    Last Post: Nov 22, 2011, 8:42 AM
  3. [CLOSED] [1.0] Loading mask does not
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 11, 2010, 3:30 PM
  4. [CLOSED] [1.0] Loading Mask
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 15, 2010, 3:35 PM
  5. [CLOSED] Loading Mask
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 28, 2009, 12:44 PM

Posting Permissions