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
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!