Closing window from button inside (yet another ...)

  1. #1

    Closing window from button inside (yet another ...)

    Hi,

    I know this question is asked quite a lot (and I guess I've read all the threads about that), but my situation seems to be different. I'm having a FormPanel loaded into a window with mode=iframe. Inside this FormPanel, there's a button which is supposed to close the current window. The most common solution to this problem seems to be giving the window an id and then calling
    parent.IdOfWindow.close()
    However, I cannot do so because these windows are created dynamically (there can even be several instances at the same time), so working with a fixed id isn't possible.
    The other approach, "climbing" the ownerCt chain up to the window doesn't seem to work. It works up to the panel, but no further.

    Is there some way to get to know the id of the current iframe from inside?
  2. #2
    Hi,

    Use parentAutoLoadControl
    parentAutoLoadControl.close();
  3. #3
    Vladimir,

    you're the man of the day for me - helped my twice within a couple of minutes with something that I've been struggling with for hours!

    parentAutoLoadControl.close() works just fine.

    Just out of curiosity: what actually *IS* parentAutoLoadControl? And how does one know? I'm really looking forward to when the ext.net docs are released...

    Thanks again!

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] Closing twice a window inside another doesn't work
    By FAS in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 30, 2011, 1:26 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