bi******@yahoo.co.uk wrote:
Hi,
Thanks, that worked great. I have one more question though.
How do you get the users visible screen width and height. I had a look
on the page you recommended above and it uses document.body.clientWidth
and document.body.clientHeight but this gives me the size of the the
page including that hidden before scrolling down. I just want the
screen size of the visible page. Any page hidden until the user scrolls
down I ont want to include in the measurement.
You need to be really clear with your terminology here. The 'visible
screen' is the computer screen and will have dimensions like 1024x768
or 1280x1024 etc. If you mean how big is the inside of the browser
window (which is what I think you mean), then heed Peter-Paul's advice:
"Extreme browser incompatibilities ahead."
You need to read the referenced page at quirksmode very carefully and
play on the test pages. The very first script (Inner width) will get
the inner dimensions for IE and most other browsers (they work for me
in IE and Firefox). But do read the associated text and go to the
test pages, you likely won't remember it all but at least you'll
appreciate the effort it must have required to for Peter-Paul to
develop the page.
Use the frameset link and have a look at the other stuff he has there,
it's all good.
--
Rob
--
Rob