[thelist] In Javascript: how to get browser's dimensions?

Carbon Chip emailus at carbonchip.com
Wed Nov 28 17:56:22 CST 2001


if you are just after fullest screen possible, chrome with NS and fullscreen
(sans-chrome) with IE, rip the source from index of www.corpdescomm.co.uk.

banrett
banrett at carbonchip.com


-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Alliax
Sent: 28 November 2001 23:31
To: thelist at lists.evolt.org
Subject: Re: [thelist] In Javascript: how to get browser's dimensions?


Thank you Chris,
I had seen this window.innerWidth, but O'Reilly says:
The pixel measure of the width of the content region of a browser window or
frame, this area is where the document appears, exclusive of all window
"chrome".
Chrome stands for the borders of the browser application.
So for a browser setup to fill the screen (not fullscreen IE style)
you won't get windwo.innerWidth = screen.width
which is my ultimate goal.

document.body.clientWidth is the same thing but for IE, and has the same
behaviour.

I suppose you would know and would have told me if there was anything
better,
closer to my goal.

What I wanted to do was (pseudo code):
if browser.width < screen.width then
 browser.width = screen.width;

So I suppose I'll do some tests and allow for an error margin.


Thank you.

----- Original Message -----
From: Chris Blessing <webguy at mail.rit.edu>
> With Netscape you can detect it using:
>
> window.innerWidth
> window.innerHeight
>
> And for IE or any document.all browser you can get it with:
>
> document.body.clientWidth
> document.body.clientHeight




---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list