Categories | Question details Back To List | ||
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: dhxWins.createWindow("mywindow",50,50); 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: this.vp.style.width = width + "px"; How should i create a window that adjusts itself to the content size, to make it also work in IE? Answer posted by Support on Aug 25, 2008 02:33 Hello, 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. Answer posted by Jeroen on Aug 25, 2008 02:36 Thank you for your reply! When will the next version be released? Answer posted by Support on Aug 25, 2008 05:01 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 ( sales@dhtmlx.com ) about customized version of dhtmlxwindows component. Answer posted on Aug 25, 2008 07:19 Ah thats a shame. Are you aware of any javascript function in IE to retrieve the hight and widht of a <div>, so i can manually specify these parameters dynamically? Thank you! Answer posted by Support on Aug 25, 2008 09:13 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 ) |