I use following code to identify the screen resolution then redirect it to different pages accordingly.
***********************************************
<%@ language=VBScript %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Hartsville</title>
<script language="JavaScript">
URL = "index800.asp";
if (window.screen.width >= 1280) {
URL = "index1280.asp";
}
else {
if (window.screen.width >= 1024) {
URL = "index1024.asp";
}
}
location.href = URL;
</script>
</head>
<body>
</body>
</html>
***********************************************
On page index800.asp, index1024.asp and index1280.asp, I have javascript code to resize the window based on screen resolution. Following is code for index800.asp
<script>
<!--
onload=init;
function init() {
HWND = window.open("default.asp?screen=800","",config="left=0,top=0,height=600,width=800");
window.opener = this;
this.close();
}
//-->
</script>
These code works fine on my own machine. But crashes browser on some testing machine, especially those with "Pop Up Blocker" installed.
Can anybody tell me if there is any other way I can reach the same goal.
Thanks!
***********************************************
<%@ language=VBScript %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Hartsville</title>
<script language="JavaScript">
URL = "index800.asp";
if (window.screen.width >= 1280) {
URL = "index1280.asp";
}
else {
if (window.screen.width >= 1024) {
URL = "index1024.asp";
}
}
location.href = URL;
</script>
</head>
<body>
</body>
</html>
***********************************************
On page index800.asp, index1024.asp and index1280.asp, I have javascript code to resize the window based on screen resolution. Following is code for index800.asp
<script>
<!--
onload=init;
function init() {
HWND = window.open("default.asp?screen=800","",config="left=0,top=0,height=600,width=800");
window.opener = this;
this.close();
}
//-->
</script>
These code works fine on my own machine. But crashes browser on some testing machine, especially those with "Pop Up Blocker" installed.
Can anybody tell me if there is any other way I can reach the same goal.
Thanks!