This is a migrated thread and some comments may be shown as answers.

get arguments of radwindow in top window from iframe

3 Answers 214 Views
Window
This is a migrated thread and some comments may be shown as answers.
Xrow
Top achievements
Rank 1
Xrow asked on 14 Apr 2010, 10:58 AM
Hi,
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
Thanks

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 14 Apr 2010, 12:23 PM
Hello,

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:
JavaScript:
 
<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 
        oManager.open(null, "RadWindow1"); 
    } 
</script> 

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

Regards,
Princy.
0
Xrow
Top achievements
Rank 1
answered on 14 Apr 2010, 04:29 PM

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

Sorry for my English

0
Georgi Tunev
Telerik team
answered on 19 Apr 2010, 08:37 AM
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.
Tags
Window
Asked by
Xrow
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Xrow
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or