Spaceman007
2004-02-13 08:27:50 UTC
Hi everyone...
I am about to get nuts!
I need a plugin-detection vor Acrobat Reader. Well, that would not be a big
deal but somehow, I am strugling with it.
The html-File on the bottom of this message is a summary of the script that
I have. when I test it local, meaning starting it on the filesystem, it
works fine.
=> acrobat is ok(true) and flash is ok(true). just like it is supposed to
be.
BUT, when I test it on a server, (localhost or any other one) acrobat will
be "false" no clue why.
Does anyone have an idea? - How do you guys check the Acrobad Reader Plugin?
Is there a better methode?
I thought abouot the security setting of the internet explorer, but this is
not possible since the flash plugin can be detected...
It might have to do something with the Acrobat Reader Plugin itself...
Anybody faced this problem before?
Thanks a lot!
Spaceman007
-------------------------------------------------------------------
<html>
<head>
<script>
function checkPlugin(active_x_name) {
return chkie(active_x_name);
}
if( navigator.appName == "Microsoft Internet Explorer") {
document.writeln('<scr'+'ipt language="VBScript">');
document.writeln('function chkie(active_x_name)');
document.writeln('Err.Clear');
document.writeln('On Error Resume Next');
document.writeln('Dim plugin');
document.writeln('set plugin = CreateObject(active_x_name)');
document.writeln('if Err.Number <> 0 then');
document.writeln('chkie = false');
document.writeln('else');
document.writeln('chkie = true');
document.writeln('end if');
document.writeln('end function');
document.writeln('</scr'+'ipt>');
}
var acrobatOkay1 = checkPlugin( "AcroExch.Document" );
alert( "Acrobat1: " + acrobatOkay1 );
var acrobatOkay2 = checkPlugin( "PDF.PdfCtrl.1" );
alert( "Acrobat2: " + acrobatOkay2 );
var flashOkay = checkPlugin( "ShockwaveFlash.ShockwaveFlash.5" );
alert( "Flash: " + flashOkay );
</script>
</head>
</html>
----------------------------
I am about to get nuts!
I need a plugin-detection vor Acrobat Reader. Well, that would not be a big
deal but somehow, I am strugling with it.
The html-File on the bottom of this message is a summary of the script that
I have. when I test it local, meaning starting it on the filesystem, it
works fine.
=> acrobat is ok(true) and flash is ok(true). just like it is supposed to
be.
BUT, when I test it on a server, (localhost or any other one) acrobat will
be "false" no clue why.
Does anyone have an idea? - How do you guys check the Acrobad Reader Plugin?
Is there a better methode?
I thought abouot the security setting of the internet explorer, but this is
not possible since the flash plugin can be detected...
It might have to do something with the Acrobat Reader Plugin itself...
Anybody faced this problem before?
Thanks a lot!
Spaceman007
-------------------------------------------------------------------
<html>
<head>
<script>
function checkPlugin(active_x_name) {
return chkie(active_x_name);
}
if( navigator.appName == "Microsoft Internet Explorer") {
document.writeln('<scr'+'ipt language="VBScript">');
document.writeln('function chkie(active_x_name)');
document.writeln('Err.Clear');
document.writeln('On Error Resume Next');
document.writeln('Dim plugin');
document.writeln('set plugin = CreateObject(active_x_name)');
document.writeln('if Err.Number <> 0 then');
document.writeln('chkie = false');
document.writeln('else');
document.writeln('chkie = true');
document.writeln('end if');
document.writeln('end function');
document.writeln('</scr'+'ipt>');
}
var acrobatOkay1 = checkPlugin( "AcroExch.Document" );
alert( "Acrobat1: " + acrobatOkay1 );
var acrobatOkay2 = checkPlugin( "PDF.PdfCtrl.1" );
alert( "Acrobat2: " + acrobatOkay2 );
var flashOkay = checkPlugin( "ShockwaveFlash.ShockwaveFlash.5" );
alert( "Flash: " + flashOkay );
</script>
</head>
</html>
----------------------------