PDA

Click to See Complete Forum and Search --> : Screen Resolution


Zaphod64831
Jun 21st, 2000, 07:37 AM
I need some code that will determine the screen resolution of the user visiting my site and alter it accordingly.
Here's a VBScript example of what I need:

If [Screen Resolution] > "800x600" Then Document.Write "<BR>"

I don't really know my VBScript or Javascript very well, so please excuse whatever mistakes I've made in the coding. But I'm sure you know what I mean.

Mark Sreeves
Jun 21st, 2000, 03:18 PM
You want the javascript screen.width and screen.height properties.

This should point you in the right direction....


<HTML>
<HEAD>
<script language="JavaScript"><!--
function Doit(){
if (screen.width > 800){
if (screen.height > 600){

alert();
}
}
}
//--></script>
</HEAD>
<body onload="Doit()">


</BODY>

</HTML>