|
Detect Flash
|
|
| Put this just under the </HEAD> tag.
<script LANGUAGE="JavaScript">
<!--
function detectFlash(){
//********Set the names of your web pages here:*****
macie = "macie.htm"
flash = "flashed.htm"
noflash = "needflash.htm"
//**************************************************
if (navigator.appName == "Microsoft Internet Explorer" &&
navigator.appVersion.indexOf("Mac") != -1 )
{
window.location=macie;
}
var plugin = (navigator.mimeTypes &&
navigator.mimeTypes["application/x-shockwave-flash"] ?
navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0);
if ((navigator.appName == "Microsoft Internet Explorer" &&
navigator.appVersion.indexOf("Mac") == -1 &&
navigator.appVersion.indexOf("3.1") == -1) || (plugin &&
parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=
4))
{
window.location=flash;
}
else
{
window.location=noflash;
}
}
// -->
</script>
To activate, simply use <body onLoad="javascript:detectFlash()">
Easy as pie!
|
|
|