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();
    Vladimir Shcheglov
    Sr. Developer
  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. Replies: 2
    Last Post: Apr 19, 2012, 9:51 PM
  2. Replies: 7
    Last Post: Feb 09, 2012, 12:17 PM
  3. Replies: 2
    Last Post: Nov 30, 2011, 2:26 PM
  4. Closing window
    By Egale in forum 1.x Help
    Replies: 1
    Last Post: May 15, 2011, 1:48 PM
  5. Window closing issue
    By jorizk in forum 1.x Help
    Replies: 4
    Last Post: Sep 10, 2010, 9:33 AM

Posting Permissions