adjust window size to content

I would like to adjust the size of the window to fit its contents. In firefox this is really easy: if you just don’t specify the window size parameters, it will automatically adjust itself to the content:


However, this does not work in IE. If you try the same in IE7, you get a script error at line 23 of dhtmlxwindows.js, referring the code: = width + “px”;

How should i create a window that adjusts itself to the content size, to make it also work in IE?

At the present moment there is no such functionality. Such window parameters as width and height should be set by user.
Auto-adjust to content functionality will be available in the next version.

Thank you for your reply! When will the next version be released?

The next release planed on end of August, but it is already closed for new features
The auto width feature will be released in later versions.

If you need such functionality ASAP, you can contact sales department ( ) about customized version of dhtmlxwindows component.

Ah thats a shame. Are you aware of any javascript function in IE to retrieve the hight and widht of a

, so i can manually specify these parameters dynamically? Thank you!

If container visible ( attached to DOM and has’t display:none style ) , its size can be get in cross-browser way

var x = node.offsetWidth;
var y = node.offsetHeight;

( based on used browser|doctype value can differ , because of different way of padding|margin|border calculation )