[CLOSED] ext:Window: I wish know when the window is closed by 'close button' of window.

  1. #1

    [CLOSED] ext:Window: I wish know when the window is closed by 'close button' of window.

    Hi!

    I wish know when the window is closed by 'close button' of window only.
    I want to treat differently when the window is closed in code or via the close button of the window itself.
    Would you like to do this in Javascript.

    Click image for larger version. 

Name:	window close.png 
Views:	150 
Size:	10.3 KB 
ID:	4198

    Thanks for any help.
    Last edited by Daniil; May 08, 2012 at 11:33 AM. Reason: [CLOSED]
  2. #2
    Hi,

    I can suggest the following solution.

    Example
    <%@ Page Language="C#" %>
    
    <%@ 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">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
    
        <ext:Window ID="Window1" runat="server" Closable="false">
            <Tools>
                <ext:Tool Type="Close">
                    <Listeners>
                        <Click Handler="var win = item.ownerCt.ownerCt;
                                        win[win.closeAction]();
                                        alert('Window is closed by the tool');" />
                    </Listeners>
                </ext:Tool>
            </Tools>
            <Listeners>
                <Close Handler="alert('Window is closed programmatically.');" />
            </Listeners>
        </ext:Window>
    
        <ext:Button runat="server" Text="Close">
            <Listeners>
                <Click Handler="App.Window1.close();" />
            </Listeners>
        </ext:Button>
    </body>
    </html>

Similar Threads

  1. [CLOSED] how to close window after click button in this window
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Jun 22, 2012, 2:48 PM
  2. Replies: 1
    Last Post: May 08, 2012, 8:21 AM
  3. [CLOSED] How to remove 'X' (window close) for popup window?
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 31, 2011, 3:50 AM
  4. [CLOSED] Problem to close Window which has another Window inside
    By asztern in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Dec 21, 2010, 5:33 PM
  5. Replies: 1
    Last Post: Apr 01, 2009, 12:24 PM

Posting Permissions