[thelist] Javascript problem in IE 4.5 Mac

sarah disaster7 at yahoo.com
Thu Feb 22 09:09:44 CST 2001


I have this javascript that detects flash and writes
the flash into the page if the user has it, and writes
a static version if the user doesn't have it. It works
fine on every browser except IE 4.5 on the mac, which
doesn't display the the flash or the static version,
it displays nothing.

The script is the first item in the <body> because
it's the first thing on the page. The script is at the
bottom of the message. Does anyone know of an issue
this would cause in IE 4.5? It seems I can't get any
javascript that's not in a function that's not in the
<head> of the page to work. Could that be it?

browserName = navigator.appName;
browserVersion = parseInt(navigator.appVersion);
browserPlatform = navigator.platform;
pluginLength = navigator.plugins.length;
hasPlugin = "false";
noautoinstall =
"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0";

switch (browserName) {
	case "Microsoft Internet Explorer":
		if (browserPlatform != "Win32" || browserVersion <
4) {
			noautoinstall = "true";
			document.write(noflash);
		}
		else {
			noautoinstall = "false";
			document.write(flash);
		}
		
		break;
	
	case "Netscape": 
		for (i=0; i < pluginLength; i++) {
			if (navigator.plugins[i].name == "Shockwave Flash
2.0" || navigator.plugins[i].name == "Shockwave
Flash") {
				hasPlugin = "true";
			}
		}

		if (hasPlugin == "true") {
			document.write(flash);
		}
		else {
			document.write(noflash);
		}
		break;

	default:
		document.write(noflash);
		break;
}

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/




More information about the thelist mailing list