[CLOSED] Access parent panel attribute from iframe

  1. #1

    [CLOSED] Access parent panel attribute from iframe

    Hi,

    I am dynamically creating a panel and loading another aspx into it's content as iFrame.

    Sth. like this:

                    MyPanel = new  Ext.Net.Panel();
                    MyPanel.ID = "MyPanel";
                    MyPanel.CustomConfig.Add(new ConfigItem { Name = "refreshMe", Mode = ParameterMode.Raw, Value = "true", Encode = false });
                    MyPanel.Loader = new ComponentLoader
                    {
                        Url = "/MyChild.aspx",
                        Mode = LoadMode.Frame,
                        LoadMask =
                        {
                            ShowMask = true,
                            Msg = "Loading..."
                        }
                    };
    I want to access MyPanel.refreshMe custom config from the iFrame aspx page. For this, I met this threat and tried using parent.window call. When I get MyPanel like this : "parent.window.MyPanel" it is not the Ext.Panel object and I have no access to MyPanel.refreshMe.

    How can I access custom config of an iFrame content's parent panel? Is it possible at all?

    Thanks.
    Last edited by Daniil; May 08, 2013 at 3:20 PM. Reason: [CLOSED]
  2. #2
    Okay, I found parent.App (;
    Last edited by bayoglu; May 08, 2013 at 2:59 PM.
  3. #3
    Bad news,

    parent.App is okay but in real scenario MyPanel ID is dynamic so I can not get it easily as "parent.App.MyPanel".

    I tried following but none return the Ext.Panel object.

    parent.Ext.get("Dynamic_ID")
    parent.document.getElementById("Dynamic_ID")

    What is the correct way of accessing an object given text ID?

    Thanks.
  4. #4
    Me again (;

    I could access it with parent.Ext.getCmp("Dynamic_ID").
    Please mark as closed.
  5. #5
    This also should work.
    parent.App["Dynamic_ID"]
  6. #6
    Cool. Thanks Daniil.

Similar Threads

  1. Replies: 0
    Last Post: Oct 17, 2012, 8:32 AM
  2. Add Tab to Parent from within IFrame
    By peter.campbell in forum 1.x Help
    Replies: 1
    Last Post: Feb 04, 2011, 12:01 PM
  3. Replies: 0
    Last Post: Sep 21, 2010, 7:33 PM
  4. [CLOSED] Get parent node custom attribute
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 14, 2010, 9:19 PM
  5. [CLOSED] Access component in IFrame from oter IFrame
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Feb 22, 2010, 5:58 PM

Posting Permissions