Screen height and widthTo get the screen size and width we just use the existing screen object like this:
bwidth=screen.width
bheight=screen.height
If we then write out that info:
document.write("You have screen resolution:" + bwidth
+ "x" +bheight)
We'll get this result:
As you can see, this is correct, and good and well. This can for instance be used for opening a new window with the same size as the screen to cover up the screen (which is really annoying). But you can't really trust these figures when it comes to available document size, most users with big monitors almost never surf with their browserwindow maximized. You can also never know what toolbars the user has.
So, we have to get the exact document size, not the screen size. Copyright ©2000-2002 DHTMLCentral.com, Bratta Communications. All rights reserved.
|