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

Multiple rad windows call to browser window

1 Answer 112 Views
Window
This is a migrated thread and some comments may be shown as answers.
Joshua
Top achievements
Rank 1
Joshua asked on 05 Apr 2011, 02:25 PM
I have a page that internally opens up a rad window.  On that rad window, it opens up a smaller rad window (to enter some options).  So Main Window opens Rad Window1 which opens Rad Window2.  When Rad Window2 times out, or encounters an error, I try and make a call to a javascript function on Main Window.  I thought I could do this using GetRadWindow.BrowserWindow.BrowserWindow.JSCall(), however, that is throwing the same error that GetRadWindow.BrowserWindow.JSCall() is throwing (JSCall is undefined).  Is there a way to make this call back to the Main Window from the second Rad Window opened?

Thanks,

Josh

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 06 Apr 2011, 03:32 PM
Hi Joshua,

This depends on the way you use RadWindow. If you only put server controls in its Content template then the RadWindow is a part of the main page and you can directly reference the functions.

You would need the method with BrowserWindow in case you load an external page and then the RadWindow's content is actually an iframe.

Then it also matters where you have defined the RadWnidows - in the main page or the second is defined in  the first. If it is in the main page using the GetRadWindow.BrowserWindow once is enough. If it is defined in the second you would first have to get a reference to the parent RadWindow and then use the BrowserWindow method.

For your convenience I have attached a simple page illustrating the approach in the heaviest case - with two nested RadWindows with external content. You can find the video from my test here:  http://screencast.com/t/QMiYiWTkrgr.


Regards,
Marin
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
Joshua
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or