Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Screen resolution & Browser check

 
Catarina Rehn
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
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
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 higher...my laptop is 1400x1050 and 32 bit color..ofcourse i need 32 MB of video RAM for that :-)
browserName = navigator.appName.substring(0,8);
if(browserName=="Netscape")
//then it is netscape
else
//it is IE (a very safe assumption as less than 1% use anything else)
-manav
 
Eilidh
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use screen.width and screen.height to get the resolution
eilidh
 
erich brant
Ranch Hand
Posts: 246
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
www.anybrowser.com free tools to check all of that and more
at url
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic