File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Screen resolution & Browser check Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Screen resolution & Browser check" Watch "Screen resolution & Browser check" New topic

Screen resolution & Browser check

Catarina Rehn

Joined: Mar 25, 2001
Posts: 3
Is there someone who can tell me how a script that check for both screen resolution and Browser in the same script?
Thnx Cat.
manav kher
Ranch Hand

Joined: Nov 21, 2000
Posts: 98
sure you can check which browser it is and what version it is and all that. I am not too sure abt the screen res part, though most UI would ask you to support 800x600 as most modern computers support Atleast that...ofcourse you can always go laptop is 1400x1050 and 32 bit color..ofcourse i need 32 MB of video RAM for that :-)
browserName = navigator.appName.substring(0,8);
//then it is netscape
//it is IE (a very safe assumption as less than 1% use anything else)

Joined: May 02, 2001
Posts: 8
You can use screen.width and screen.height to get the resolution
erich brant
Ranch Hand

Joined: Sep 27, 2000
Posts: 246 free tools to check all of that and more
at url

I agree. Here's the link:
subject: Screen resolution & Browser check
It's not a secret anymore!