Click to See Complete Forum and Search --> : plugins
pretpat
12-26-2002, 09:29 AM
To visit my website you need java flash and realplayer plugin and I want the visitor to get an alarm window when they do not have the plugin installed. I found several plugin scripts but all they do is show all installed plugins on your screen. So I need a script that will check for the specific plug in and warn them.
thanx
khalidali63
12-26-2002, 06:09 PM
You will have to determine that for which plugins you want to look for,below it the code that Iuse to find out if flash is installed .
<script language="JavaScript">
//detect flash player plugin
if ( (navigator.plugins && navigator.plugins["Shockwave Flash"]) ) {
//ok flash is detected
flashDetected = true;
}
</script>
FYI
navigator.plugins is an array and you can get the length of this array by using "length" property.
Then iterate thru it and find out about the installed plugins.
Khalid
That's probably not working on IE, cause the navigator.plugins.length always returns a '0' in IE, also IE don't know the name attribute of the plugins (plugins.name).
pretpat
12-28-2002, 07:22 AM
You're right Swon i can't get it to work in IE. How can i change it so it will work in IE? And is there an option that allows parts of the plugin name? because the full plugin name for realplayer is: RealPlayer(tm) G2 LiveConnect-Enabled Plug-In (32-bit) . And when i leave out one thing it will say its not installed. This plugin seems to be a specific type of plugin and i think it will still alert the visitor it needs the plugin eventho it has realplayer installed but a different version.
khalidali63
12-28-2002, 10:03 AM
My fault pretpat,
its my (bad?) habbit that I write code in NS browsers and some time forget to update it for IE.
below is the sample snippet that will look for flash in VBScript
<script language="VBScript">
<!--
'vbscript to see if the flash active x control capable browser
flashDetected = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))
//-->
</script>
follow the pattern and do a search over the internet to create a list of all the pluggins using VBScript
Khalid