[CLOSED] Closing a parent window from a child iFrame button (dynamic window ID's)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Closing a parent window from a child iFrame button (dynamic window ID's)

    Hi All,

    I've got an situation where we'd like to close a parent window from a button within a nested child iFrame.

    I've had a read around and most of the solutions seem to centre around using 'window.parent' and a reference to the WindowID. This works ok if you know the ID of the window, but with the app we're currently working it, we're using the desktop control, and window ID's are created dynamically.

    This leaves us with a situation where if I Page.aspx it's ID might be 'win_1' whereas if I then open the same page again it might be 'win_2'.

    Has anyone stumbled accross an effective mechanism to determine the parent windows ID from the child iFrame's button?

    At the moment I've spent some time trying to use a recursive method to traverse the DOM up to the parent window (which seems to bail when I hit the top of the iFrame).
    Also tried a few ways to pass the current window's ID about, perhaps in the querystring when opening it and then parsing that back out with window.document.location.search, that kind of thing.

    I'm sure someone must have encountered this before, any pointers would be greatly appreciated.

    Many thanks,

    Doug
    Last edited by Daniil; Feb 09, 2012 at 10:05 AM. Reason: [CLOSED]

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: 6
    Last Post: Feb 15, 2012, 4:15 PM
  3. [CLOSED] How to display child window outside Parent window
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 02, 2010, 11:06 AM
  4. Replies: 0
    Last Post: Jul 28, 2009, 3:53 PM
  5. Replies: 1
    Last Post: Apr 01, 2009, 12:24 PM

Tags for this Thread

Posting Permissions