Detect if Browser supports Flash

Detect if Browser supports Flash or not ( using ShockwaveFlash.ShockwaveFlash)
Then redirects user to a flash-enabled page or none-flash-enabled page
This is a JavaScript and VBScript conjunction code
It can show you how easily we can exchange variables across those two languages

CodeFunctionName
What is this?

Public

Not Tested

Imported
' Detects if user has Flash. By: Preben (from psc cd)
' This will detect is the user has the flash plug in. And then redirect to a page with flash or one without. NICE!!
<Html >
<head >
<title >www.prebenmusic.com </title >
<meta name="generator" content="prebenmusic scripts" >
</head >
<Body >
<Script language="javascript" >
var useFlash = navigator.mimeTypes &&
navigator.mimeTypes["application/x-shockwave-flash"] &&
navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
</Script >
<script language="vbscript" >
On error resume next
useFlash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))
</Script >
<script language="javascript" >
if ( useFlash ) {
window.location = "pagewithflash.htm";
}
else {
window.location = "otherpage.htm";
}
</Script >
</body >
</html >

Views 2,090

Downloads 691

CodeID
DB ID