[CLOSED] [1.0] Closing windows?

  1. #1

    [CLOSED] [1.0] Closing windows?

    Hello,

    I've a gridpanel with a toolbar, from toolbarButton open a window in frame mode with a form.

    NewWindow(null, 'WinNew', 'Add.aspx?type=' + type, 'Crear elemento', h, w, false, true, true, true, 'icon_Add');
    
    function NewWindow(container, winId, winURL, winTitle, winHeight, winWidth, winModal, winMax, winRes, winCollap, winIconCls) {
                    if (winTitle == '' || winTitle == undefined) { winTitle = 'Teste' }
                    if (winCollap == '' || winCollap == undefined) { winCollap = false }
                    if (winRes == '' || winRes == undefined) { winRes = false }
                    if (winModal == '' || winModal == undefined) { winModal = false }
                    if (winHeight == '' || winHeight == undefined) { winHeight = 500 }
                    if (winWidth == '' || winWidth == undefined) { winWidth = 500 }
                    var win = new Ext.Window({ renderTo: Ext.getBody(),
                                    maximizable: winMax,
                                    resizable: winRes,
                                    collapsible: winCollap,
                                    constrain: false,
                                    title: winTitle,
                                    height: winHeight,
                                    width: winWidth,
                                    modal: winModal,
                                    iconCls: winIconCls,
                                    frame: true,
                                    layout: 'fit',
                                    autoLoad: { maskMsg: "Cargando...", showMask: true, mode: "iframe", url: winURL }
                    });
                    win.show();
    
    }
    In the page opened in the window in frame mode, I want to close the window. How can I refer to the window on parent opener?


    Thanks.
    Last edited by Daniil; Oct 06, 2010 at 3:04 PM. Reason: [CLOSED]
  2. #2
    Hi,

    You can call .getBody() on the parent Panel, which will return an instance of the child iframe page. Then just close as normal.

    Example

    Panel1.getBody().Window1.close();
    Geoffrey McGill
    Founder

Similar Threads

  1. [CLOSED] Desktop windows not destroyed on closing
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 30, 2012, 7:04 PM
  2. [CLOSED] IIS7 Windows 7 x Windows 2008
    By majunior in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Nov 08, 2011, 6:56 PM
  3. [CLOSED] Executing actions on closing dinamically created windows
    By jcanton in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 24, 2009, 7:31 AM
  4. [CLOSED] Closing dinamically created windows
    By jcanton in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 23, 2009, 9:24 AM
  5. [CLOSED] Desktop BUG: Modal windows can be minimized and you can interact with the other windows
    By juanpablo.belli@huddle.com.ar in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 31, 2009, 2:49 PM

Posting Permissions