|
-
Jun 21st, 2000, 07:37 AM
#1
Thread Starter
Hyperactive Member
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.
-
Jun 21st, 2000, 03:18 PM
#2
Frenzied Member
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>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|