get arguments of radwindow in top window from iframe

4 posts, 0 answers
  1. Xrow
    Xrow avatar
    2 posts
    Member since:
    Oct 2008

    Posted 14 Apr 2010 Link to this post

    I have a page contains iframe
    ex: Page1.aspx contains radwindow and a iframe, iframe load Page2.aspx
    Page2.aspx contains a button1 and a textbox
    How to open radwindow when button1 is clicked and set arguments of radwindow when it closed to value of textbox
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 14 Apr 2010 Link to this post


    You can access the RadWindowManager placed in the main page using the "window.parent.GetRadWindowManager()" method and then use the open() method to show the window.

    Here is the code that I tried in Page2.aspx:
    <input id="Button1" type="button" value="openWin" onclick="openWin();" /> 
    <script type="text/javascript"
        function openWin() { 
            var oManager = window.parent.GetRadWindowManager(); 
            //Show a particular existing window 
  , "RadWindow1"); 

    Add the window with ID RadWindow1 in Page1.aspx:
    <iframe src="Page2.aspx"></iframe> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
            <telerik:RadWindow ID="RadWindow1" NavigateUrl=""

  3. Xrow
    Xrow avatar
    2 posts
    Member since:
    Oct 2008

    Posted 14 Apr 2010 Link to this post

     Thank you Princy, but how to Returning values to page2 from rad window.

    Sorry for my English

  4. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 19 Apr 2010 Link to this post

    Hi Xrow,

    You could return the argument from RadWIndow to the calling page by using the suggestions in this help topic. Sending arguments from that page to another page in an IFRAME is a general programming task and I suggest to check the Net for the available solutions - for example you could call a function in that IFRAME and pass the argument there: (document.getElementById('iframeid').contentWindow.myFunc();)

    All the best,
    Georgi Tunev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top