Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Acrobat Detection Script

Status
Not open for further replies.

apparition

Technical User
Aug 8, 2001
34
US
I wrote a script to detect what version of the acrobat reader a browser has. I want to use javascript but it does not work for Internet Explorer. The only way I've found to do it is with vbscript.

Does anyone know how to detect what version of acrobat reader is installed in IE with javascript???

Here is what I have now:


<script language=&quot;javascript&quot; type=&quot;text/javascript&quot;>
<!--

browser='OTHER';

if (navigator.appName=='Microsoft Internet Explorer')
{
browser='MSIE';
}
if (navigator.appVersion.indexOf('MSIE 3')>0)
{
browser='MSIE';
}

if (browser=='OTHER')
{
var acrmode = false

acrPlugin = navigator.plugins['Adobe Acrobat'];

if (acrPlugin.description == 'Adobe Acrobat Plug-In Version 5.00 for Netscape')
{
acrmode = true
}
}

//-->
</script>

<script language=&quot;vbscript&quot; type=&quot;text/vbscript&quot;>
<!--

on error resume next
var acrmode
acrmode = IsObject(CreateObject(&quot;pdf.pdfctrl.5&quot;))

-->
</script>

<script language=&quot;javascript&quot; type=&quot;text/javascript&quot;>
<!--
function acrobatCheck()
{
if (acrmode){

}
else{

if (confirm('For best results, it is recommended that you open this file with the Adobe Acrobat 5 Reader. It appears you do not have the latest version installed. Would you like to download it now?'))
{
window.location='../mit/tsd/dl_acr.htm';
return false;
}
else
{
return true;
}
}
}
//-->
</script>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top