LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG-Webdev] Resizing windows

[ILUG-Webdev] Resizing windows

Niall O Broin niall at linux.ie
Tue Mar 11 00:49:11 GMT 2003


I have code which displays a largish image in a preview window, together with 
some information about the image. I use this javascript to neatly resize the 
window for the size of the content:


window.innerHeight = document.height + 20;
window.innerWidth = document.width + 20;

which very nicely resizes the window based on how much space its content needs 
leaves just a little blank all round. However this code only works in 
Navigator 4.7 so as you can imagine, not many people get the benefit of it 
any more.

For other browsers, I pass window sizes from the server. However, these are 
only approximations, and can result in my having windows with scrollbars, 
which is exactly what I want to avoid. Is there some nifty DOM based way of 
doing something like this for current browsers ?




Niall




More information about the Webdev mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell