Problem with GetRadWindow()? Just checking...

3 posts, 1 answers
  1. Eric
    Eric avatar
    82 posts
    Member since:
    Feb 2009

    Posted 24 Aug 2009 Link to this post

    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. Answer
    Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 24 Aug 2009 Link to this post

    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.
  3. Eric
    Eric avatar
    82 posts
    Member since:
    Feb 2009

    Posted 24 Aug 2009 Link to this post

    Thanks
Back to Top