
Hell of a Time - Detect Plugins, Close Parent Window, Detect 128 bit Encryption Browser, create Shortcut
Hello,
Use this code. :-)
Enjoy it!
Pedro Bastos
Quote:
> 1) I want to be able to detect if Macromedia Shockwave Plugins exits in
PC
> on both IE and NS browers. If not, launch page to allow download - just
> like the way www.shockwave.com does it if you go to their site and if you
> don't have the plugins. I can use the navigator.plugins to return plugins
> on NS but this won't work with IE.
<script language="
VBScript">
Function TestActiveX(objectID)
on error resume next
TestActiveX = IsObject(CreateObject(objectID))
End Function
</script>
<SCRIPT LANGUAGE=JavaScript>
<!--
function checkForFlash()
{
navigator.plugins.refresh();
if ( navigator.appName &&
navigator.appName.indexOf("Netscape") != - 1 &&
navigator.appVersion.indexOf("4.") != - 1 ){
if ( !navigator.plugins["Shockwave Flash"]
alert ("You dont have any shockwave flash player.");
}
} else {
fversion = 0;
swversion = 0;
if( TestActiveX("ShockwaveFlash.ShockwaveFlash.4")) { fversion = 4 }
else if ( TestActiveX("ShockwaveFlash.ShockwaveFlash.3")) { fversion =
3 }
else if ( TestActiveX("ShockwaveFlash.ShockwaveFlash.1")) { fversion =
2 }
if ( TestActiveX("SWCtl.SWCtl.8")) { swversion= 8 }
else if ( TestActiveX("SWCtl.SWCtl.7")) { swversion= 7 }
else if ( TestActiveX("SWCtl.SWCtl.1")) { swversion= 6 }
if ( swversion < 6 ) { alert ("You dont have any shockwave player or an
old version."); }
else if ( fversion < 4 ) { alert ("You dont have any flash player or an
old version."); }
alert("Your Flash version is: "+fversion);
alert("Your Shockwave version is: "+swversion);
}
Quote:
}
</SCRIPT>