This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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