View Full Version : Testing for Flash plug-in
I had a Flash into designed for me, but the guy used ASP in the index page to test for the Flash plug-in and send the visitor to a plain html version if they don't have the plug-in.
But .... it won't work hosted on PowWeb so..... I checked and PowWeb does not support ASP/VB.
Is there a JavaScript or PHP way to test for Flash that works here at PowWeb?
Here is where the intro is -
http://www.jmmgrace.com/index.html
Thanks,
Here is the javascript code generated by Dreamweaver MX
Copy and paste the following in the HEAD tags:
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0
var ok=false; document.MM_returnValue = false;
with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
ok=(plugins && plugins[plgIn]);
} else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
else ok=autoGo; }
if (!ok) theURL=altURL; if (theURL) window.location=theURL;
}
//-->
</script>
Then place this code in the openning BODY tag, replacing index_noflash.htm with your url without flash:
<body onLoad="MM_checkPlugin('Shockwave Flash','','index_noflash.htm',true);return document.MM_returnValue">
Hope this helps.
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.