Here's my redirect page:
<script language="JavaScript">
// Finding out which browser is being used//
var type;
name = navigator.appName;
ver = parseInt(navigator.appVersion);
if (name == "Netscape" && ver >= 3) { type = 1; }
else if (name == "Microsoft Internet Explorer" && ver >= 4) { type = 2; }
else { type = 0 }
//Dealing with Netscape 3 and later//
if ( type == 1 ) {
var tools=java.awt.Toolkit.getDefaultToolkit();
var size=tools.getScreenSize();
w=size.width;
if ( w <= 640 ) {
location.href = "http://www.hikefordiabetes.org/intro800.htm";
}
else if ( w >= 641 && w <= 800 ) {
location.href = "http://www.hikefordiabetes.org/intro800.htm";
}
else if ( w >= 801 ) {
location.href = "http://www.hikefordiabetes.org/intro.htm";
}
}
//Dealing with MSIE4 (this bit of script will also work for Netscape4)//
else if ( type == 2 ) {
if (screen.height=="480"
{
location.href="http://www.hikefordiabetes.org/intro800.htm";
}
if (screen.height=="600"
{
location.href="http://www.hikefordiabetes.org/intro800.htm";
}
if (screen.height>"600"
{
location.href="http://www.hikefordiabetes.org/intro.htm";
}
}
//Dealing with everything else - default to lowres mode//
else if ( type == 0 ) {
if ( confirm("Low screen resolution, the use of Netscape2 or other old browser has been detected.\n\nAlthough we have provided for this possibility, you may be unable to use all the features of this site.\n\nIf you are using Microsoft Internet Explorer 3 with a screen resolution of 800x600 or greater, please click on CANCEL, otherwise click on OK."
== false ) {
location.href = "http://www.hikefordiabetes.org/intro.htm";
}
else {
location.href = "http://www.hikefordiabetes.org/intro800.htm";
}
}
</script>
Anyone know what's wrong with that? It works in IE5 and NS...but not Opera. Opera just gets a blank page.
Location:
Page
Rob
<script language="JavaScript">
// Finding out which browser is being used//
var type;
name = navigator.appName;
ver = parseInt(navigator.appVersion);
if (name == "Netscape" && ver >= 3) { type = 1; }
else if (name == "Microsoft Internet Explorer" && ver >= 4) { type = 2; }
else { type = 0 }
//Dealing with Netscape 3 and later//
if ( type == 1 ) {
var tools=java.awt.Toolkit.getDefaultToolkit();
var size=tools.getScreenSize();
w=size.width;
if ( w <= 640 ) {
location.href = "http://www.hikefordiabetes.org/intro800.htm";
}
else if ( w >= 641 && w <= 800 ) {
location.href = "http://www.hikefordiabetes.org/intro800.htm";
}
else if ( w >= 801 ) {
location.href = "http://www.hikefordiabetes.org/intro.htm";
}
}
//Dealing with MSIE4 (this bit of script will also work for Netscape4)//
else if ( type == 2 ) {
if (screen.height=="480"
location.href="http://www.hikefordiabetes.org/intro800.htm";
}
if (screen.height=="600"
location.href="http://www.hikefordiabetes.org/intro800.htm";
}
if (screen.height>"600"
location.href="http://www.hikefordiabetes.org/intro.htm";
}
}
//Dealing with everything else - default to lowres mode//
else if ( type == 0 ) {
if ( confirm("Low screen resolution, the use of Netscape2 or other old browser has been detected.\n\nAlthough we have provided for this possibility, you may be unable to use all the features of this site.\n\nIf you are using Microsoft Internet Explorer 3 with a screen resolution of 800x600 or greater, please click on CANCEL, otherwise click on OK."
location.href = "http://www.hikefordiabetes.org/intro.htm";
}
else {
location.href = "http://www.hikefordiabetes.org/intro800.htm";
}
}
</script>
Anyone know what's wrong with that? It works in IE5 and NS...but not Opera. Opera just gets a blank page.
Location:
Page
Rob