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

RadWindow Resize Problem in IE6

1 Answer 82 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andrei
Top achievements
Rank 1
Andrei asked on 16 Feb 2009, 04:05 PM

We are using RadWindow 1.8.2.0 and we are programatically resizing the RadWindow based on the user's resolution.
It works fine in IE7 and Firefox, but it doesn't work in IE6. Are we doing something wrong or there's a bug with it in this version?

Here is the JavaScript code:

        function ResizeWindow()
        {
            var win = GetRadWindow();
            var width = window.parent.document.body.clientWidth;
            var height = window.parent.document.body.clientHeight;
            if (width < 820)
                width -=20;
            else
                width = 820;
                
                
            if (height < 780)
                height -=20;
            else
                height = 780;
               
           
           win.SetSize(width,height);
           win.Restore()
        }



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

The function is called automatically by placing the script at the end of the HTML page:
    <script type="text/javascript">
            ResizeWindow();
    </script>

I would appreciate your help.

Thank you,
Andrei







1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 19 Feb 2009, 02:20 PM
Hi Andrei,

In general, extracting the viewport size is done in different manner under different browsers. This being said, using the clientWidth and clientHeight will give the same result if you use a standard IFRAME instead of RadWindow and this is not directly related to the control. I suggest to test your solution with offsetWidth and offsetHeight and also to make a research of other possible cross browser solutions on the web.

All the best,
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.
Tags
Window
Asked by
Andrei
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or