Bernfarr is right, the image object was not supported in IE 3 but will work fine in IE 4 and on Netscape. Aside from tearing out your hair there's nothing you can do for IE 3 users. But if you want to give users other than those with IE3 the full benefit of your script, you can do so by simply trapping non-compatible browsers (IE 3 and AOL for sure, plus a few others) as they enter the page and redirecting them to a simpler page - perhaps one where the image remains static but the link changes.
Use this script, with appropriate alterations to point to the correct page titles. You can of course use the same page for two or more browsers. The default page is for non-MSIE or Netscape *Javascript-enabled* browsers. Of course browsers which can't read Javascript at all will simply stay on the first page, which should have either a text-only version or a link to a page with a text-only version.
You can vary the transfer time - I've set it at 2 seconds, which should be long enough for the script to download and activate, but not so long as to unduly annoy your visitors:
<Script>
<!-- Hide from older browsers
var nav2 = "navigator2.htm";
var nav3 = "navigator3.htm";
var nav4 = "navigator4.htm";
var ie3 = "ie3.htm";
var ie4 = "ie4.htm";
var default_page = "default.htm";
var transfer = true;
var pause_time = 2;
function loadPage() {
if (navigator.appName=="Netsc
if (vers >= 4)
location.replace(nav4);
else if (vers >= 3)
location.replace(nav3);
else if (vers >= 2)
location.href=nav2;
} else if (navigator.appName == "Microsoft Internet Explorer") {
if (vers >= 4)
location.replace(ie4);
else if (vers >= 3)
location.href=ie3;
} else {
location.href=default_page
}
}
// End hiding -->
</Script>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<! --- Put some content in here if you wish - at least the text link mentioned above ---->
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin Hiding
vers = navigator.appVersion;
vers = parseFloat(vers.substring(
browser=navigator.appName + " " + vers;
if (transfer) {
document.write("<CENTER>Yo
+ "suited to your browser in "+pause_time+" seconds<BR><BR></CENTER>")
setTimeout("loadPage()",pa
}
// End Hiding -->
</SCRIPT>
</BODY>
Main Topics
Browse All Topics





by: bernfarrPosted on 1998-09-03 at 15:45:39ID: 1270285
You real question (Why MS is so stupid) is a good one. Why are both companies not working on standardizing handling of HTML and JavaScript, etc., is the real question.
Anyway, images was not supported in IE3 (apparently it did work on the IE3 implementation on the Mac, according to the JavaScript Bible). It is supported with IE4/JavaScript 1.2.