-
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:
Code:
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.
-
You want the javascript screen.width and screen.height properties.
This should point you in the right direction....
Code:
<HTML>
<HEAD>
<script language="JavaScript"><!--
function Doit(){
if (screen.width > 800){
if (screen.height > 600){
alert();
}
}
}
//--></script>
</HEAD>
<body onload="Doit()">
</BODY>
</HTML>