View Single Post
  #1  
Old 27th February 2013, 15:43
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default Screen resolution detection and notification
attention

Attention

Working with all sourcecodes!




A script that tests the surfer's screen size, and if it's not a certain size (ie: 800*600), suggests to the surfer to change resolution.

PHP Code:
<script language="JavaScript1.2">
<!--
var 
correctwidth=800
var correctheight=600

if (screen.width!=correctwidth||screen.height!=correctheight)
document.write("This webpage is best viewed with screen resolution "+correctwidth+"*"+correctheight+". Your current resolution is "+screen.width+"*"+screen.height+". If possible, please change the resolution!")
//-->
</script> 
Enjoy
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif

Last edited by Chez; 27th February 2013 at 16:29.
Reply With Quote
The Following User Says Thank You to Chez For This Useful Post:
nicukent (2nd February 2014)