[CLOSED] X.Msg with Modal Window

  1. #1

    [CLOSED] X.Msg with Modal Window

    I have a modal window. When the user inputs invalid data on the window's controls, I want to alert them via X.Msg.Notify.

    However when I try to do so, the alert popup animates into place above the modal window, but as soon as the animation is complete it blinks behind the window, where it is not visible. Thus the pause for reading and the "animate-out" are not shown. I would like to keep it above the modal window. Possibly I need to set a target or zindex on the message?

    Please advise how to prevent this. Thanks!
    Last edited by Daniil; Sep 21, 2011 at 8:42 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Please try to set up Modal = true.
    X.Msg.Notify(new NotificationConfig()
    {
        Title = "Title",
        Html = "Hellow World!",
        Modal = true
    });
  3. #3
    Hi Danill,

    Unfortunately I'm still seeing the issue. Here is a simple example to illustrate:


    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="LW4.WWW.Admin.Web.Test" %>
    <%@ 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">
        [DirectMethod]
        public void DoNotifyTest()
        {
            X.Msg.Notify(new NotificationConfig()
            {
                Title = "Notification",
                Html = "Read me!",
                Modal = true
            }).Show();
        }
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <ext:ResourcePlaceHolder runat="server"></ext:ResourcePlaceHolder>    
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager runat="server" ID="ResourceManager1" />            
            <ext:Viewport runat="server" ID="ViewportMain" Layout="FitLayout">
                <Items>                
                    <ext:Panel runat="server" ID="PanelMain" Layout="FormLayout">
                        <Items>
                            <ext:Button runat="server" ID="btnTest" Text="Show">
                                <Listeners>
                                    <Click Handler="#{myWindow}.show();" />
                                </Listeners>
                            </ext:Button>
                        </Items>
                    </ext:Panel>                
                </Items>            
            </ext:Viewport>        
    
            <ext:Window runat="server" ID="myWindow" Maximized="true" Layout="FormLayout" Hidden="true">
                <Items>
                    <ext:Button runat="server" ID="btnNotify" Text="Notify">
                        <Listeners>
                            <Click Handler="Ext.net.DirectMethods.DoNotifyTest();" />
                        </Listeners>
                    </ext:Button>
                </Items>
            </ext:Window>
    
        </form>
    </body>
    </html>
    Click the "Show" button to show the window. Then click the "Notify" button to execute the DirectMethod. Notice that while you can see the notification animate in, it immediately disappears behind the window. In fact if you close the window quickly, you can watch the notification reappear and animate out.
  4. #4
    Try to set BringToFront = true for the notification
  5. #5
    Thank you Vlad, adding BringToFront and removing Modal achieved the result I wanted:

        [DirectMethod]
        public void DoNotifyTest()
        {
            X.Msg.Notify(new NotificationConfig()
            {
                Title = "Notification",
                Html = "Read me!",
                BringToFront = true
            }).Show();
        }
    Please close the thread.

Similar Threads

  1. Replies: 5
    Last Post: Apr 20, 2012, 6:20 AM
  2. [CLOSED] Ext.Window: Question about clicking outside a modal Window
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 07, 2012, 6:00 AM
  3. [CLOSED] Get the x,y position of a modal window
    By fordprefect in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 08, 2011, 6:26 PM
  4. [CLOSED] Modal Window Issue
    By SamFoot in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 27, 2011, 9:37 AM
  5. Modal Window
    By erey in forum 1.x Help
    Replies: 0
    Last Post: Mar 29, 2010, 12:06 PM

Posting Permissions