Access parent page

3 posts, 1 answers
  1. eric
    eric avatar
    35 posts
    Member since:
    Mar 2009

    Posted 02 Jun 2009 Link to this post

    Is it possible to access public propertys on the parent page of a rad window?  When I say parent page I mean the page that contains the rad window.  When not using Radwindows I do the following...



    parPage As MyPage= Me.Parent

    I could send the values to the radwindow but it seems like there should be a way to get the values directly from the parent.  Any thoughts?


  2. Answer
    Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 03 Jun 2009 Link to this post

    Hi Eric,

    When working with RadWindow, you are working with an IFRAME (the control is basically an IFRAME and behaves just like one. Since in such scenario you have 2 different pages, e.g. parent and content one, you cannot directly access the controls in the parent page from within the content page. That is why we have provided a rich client-side API (check the Programming section of RadWindow's documentation) that will allow you to work with the controls on the client, via JavaScript. For example you could get a reference to the corresponding control and take some arguments on the client in the content page and then - to sent them to the server via a postback or RadAjax's ajaxRequest.

    Best wishes,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Keith
    Keith avatar
    61 posts
    Member since:
    May 2008

    Posted 01 Jun 2010 Link to this post

    The document in the RadWindow is in an IFRAME, you should be able to get to objects in the parent page through 

    top.document or window.parent.document

    for example

    top.document.getElementById("name of element")


    window.parent.document.getElementById('name of element')

    Keith E.

Back to Top