Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

New browsers window after "check plugin"...

Posted 04 Feb 2002 16:09:28
1
has voted
04 Feb 2002 16:09:28 Matti Mustajärvi posted:
How do I edit the script Dreamweaver generates with the "check plugin" behaviour, if I want the user redirected to a new browser window after the presence of the plugin has been evaluated?
This is how it looks like now:

<font size=1>
&lt;script language="JavaScript"&gt;
&lt;!--
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;
}
//--&gt;
&lt;/script&gt;

&lt;body onLoad="MM_checkPlugin('Shockwave Flash','flashed.htm','flashless.htm',false);return document.MM_returnValue"&gt;

&lt;script name="Used by MM_checkPlugin" language="javascript"&gt;
&lt;!--
with (navigator) if (appName.indexOf('Microsoft')!=-1 && appVersion.indexOf('Mac')==-1) document.write(''+
'&lt;scr'+'ipt language="VBScript"&gt;\nOn error resume next\n'+
'MM_dir = IsObject(CreateObject("SWCtl.SWCtl.1")\n'+
'MM_flash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash")\n&lt;/scr'+'ipt&gt;');
//--&gt;
&lt;/script&gt;
</font id=size1>

Reply to this topic