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

[Solved] Problem with GetRadWindow()? Just checking...

2 Answers 199 Views
Window
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 24 Aug 2009, 12:51 PM
I am trying to use GetRadWindow() but it blows up in javascript...

        function GetRadWindow() {  
            var oWindow = null;  
            if (window.radWindow)  
                oWindow = window.radWindow;  
            else if (window.frameElement.radWindow)  
                oWindow = window.frameElement.radWindow;  
            return oWindow;  
        }  
 

In my case (IE 8 in compatibility mode), window.radWindow is undefined, window.frameElement is null, therefore it blows up when trying to access window.frameElement.radWindow.

This happens in my "main" (default) page.
Does this happen because the page itself was not created by the RadWindow Manager?

Since my current page is not a RadWindow... How can I find its size so that I can size new windows accordingly?

Many Thanks


Eric

2 Answers, 1 is accepted

Sort by
0
Accepted
Svetlina Anati
Telerik team
answered on 24 Aug 2009, 12:58 PM
Hi Eric,

The GetRadWindow function is used to reference the RadWindow from inside the page which is loaded in it. That is why it throws an error when you want to use it on the main page. If you want to get the viewport bounds you should use javascript and the standard manners to do this depending on your exact requirements and scenario. You can also search the web which contains many relevant topics.

Greetings,
Svetlina
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.
0
Eric
Top achievements
Rank 1
answered on 24 Aug 2009, 01:03 PM
Thanks
Tags
Window
Asked by
Eric
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Eric
Top achievements
Rank 1
Share this question
or