Page 1 of 1

script for screen resolution

Posted: Mon Aug 26, 2002 3:12 pm
by ToZero
Hello!

:?: I'm looking for a (php)-script which gives a popup-screen when the visitors screen resolution is smaller than the usual 1024x786. Who can give me such script, or websites where I can find something equal?

:!: Tnx!

To

Posted: Mon Aug 26, 2002 3:21 pm
by Takuma
Ahh here it is but you should have posted in Client Side Forum.

Code: Select all

<script language="Javascript" type="text/javascript">
<!--
  var sWidth = screen.width;
  var sHeight = screen.height;

  if(sWidth < 1024 && sHeight < 768) &#123;
    widow.alert("You are using a screen smaller than 1024x768");
    window.open("screen.html","Screen", "toolbar=no, location=no,direcotries=no,width=300,height=250");
  &#125;
//-->
</script>
This will create an alert window if it less than 1024x768 and then open screen.html in new window