At 01:42 PM 11/03/2003 +0000, Niall O Broin wrote:
>Now that this document has been rendered, what are the dimensions of the box
>which would just contain it ?
>>Resize the window to those dimensions.
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20275475.html
has an IE only hack that could help in your problem. Detect if there is a
horizontal scrollbar - if so make window wider. Ditto for vertical scrollbar.
>document.width and .height provide that information for NS4. It doesn't seem
>to be possible to get it in IE. I was wondering if perhaps someone could
>suggest some DOM magic which might work e.g. place everything on a layer, get
>the dimensions of the layer, resize the window to suit.
There are still a lot left to be desired of w3c DOM implementations in all
browsers. For example - if you were to place both your image and
descriptive text inside a DIV tag, its height and width are null unless you
explicitly set it via CSS (this is I presume because you get its height and
width using stylesheets also - elementObject.style.height). Checking this
just now reveals the same in Phoenix. So no, I can't see any way to do what
you want in current browsers.
Lee Hosty -x- hostyle AT csn.ul.ie -x- +353 (0)86 8768780
--
YONKERS (n.)
(Rare.) The combined thrill of pain and shame when being caught in public
plucking your nostril-hairs and stuffing them into your side-pocket.
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!