Closing a parent window from code behind

  1. #1

    Closing a parent window from code behind



    Hi everone,

    I create a window inside my desktop page and load another aspx inside the child window.

    I am trying to close a child window from code behind. I close it from a button handler as the following code:
    
    
    
    <ext:ToolbarButton runat="server" ID="btnclosepass" Text="Close" Icon="Cross">
    
    
    <Listeners>
    
    
    <Click Handler="parent.window.changepasswordwin.close()" />
    
    
    </Listeners> 
    
    
    <ToolTips>
    
    
    <ext:ToolTip ID="ToolTip2" runat="server" AutoShow="true" Html="Exit"></ext:ToolTip>
    
    
    </ToolTips>
    
    
    </ext:ToolbarButton>
    Is it possible to do the same from code behind? (Closing the child window)
    Thanks,
    Kamal
  2. #2

    RE: Closing a parent window from code behind

    Hi kamal,

    The following should work...


    Example


    btnclosepass.AddScript("parent.window.changepasswordwin.close();")

    Hope this helps.


    Geoffrey McGill
    Founder
  3. #3

    RE: Closing a parent window from code behind



    Hi,
    It did help. Thank you so much.
    Kamal

Similar Threads

  1. [CLOSED] Problem: Closing Maximized Window will loose parent window scrollbar
    By tlfdesarrollo in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 19, 2012, 8:51 PM
  2. Replies: 7
    Last Post: Feb 09, 2012, 11:17 AM
  3. [CLOSED] Problem closing parent window
    By tlfdesarrollo in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 20, 2012, 3:18 PM
  4. Closing window
    By Egale in forum 1.x Help
    Replies: 1
    Last Post: May 15, 2011, 12:48 PM
  5. Window closing issue
    By jorizk in forum 1.x Help
    Replies: 4
    Last Post: Sep 10, 2010, 8:33 AM

Posting Permissions