Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: flesh 5 detection not working in IE6


Message #1 by Jonathan McNeil <juronimo@y...> on Mon, 15 Oct 2001 15:51:05 -0700 (PDT)
This is my code for flash detection. When I test
this in IE6 with the shockwave flash plugin deleted,
it does not go to the "else" option. It acts like the
plugin is there and then goes to a screen with missing
flash images instead of the html screen. Has anyone
else attempted this? Below is my code.

function detectIT()
{
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) ||
	(navigator.plugins && navigator.plugins["Shockwave
Flash"]) ||
	plugin &&
parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))
>= 5) 
	{
		//Flash 5 or greater is available
		document.frmDetect.flash.value = 1;

	}
	else 
	{
		//Flash 5 is not available
		document.frmDetect.flash.value = 0;
	}
	document.frmDetect.submit();
}
// Close the comment tag. -->

  Return to Index