Here's some HTML/JS code that I wrote way, way back that should give you
what you need.  Combine this with using JS to update a hidden form field and
you can figure out whether or not the client supports Acrobat.

<HTML>
<HEAD>
    <TITLE>My Mime Types Page</TITLE>

    <SCRIPT LANGUAGE="JavaScript">
    <!--
        var pdf_flag = 0;
        var fdf_flag = 0;

        for (i = 0; i < navigator.mimeTypes.length; i++)
        {
            if (navigator.mimeTypes[i].type == "application/pdf")
            {
                pdf_flag = 1;
            }

            if (navigator.mimeTypes[i].type == "application/vnd.fdf")
            {
                fdf_flag = 1;
            }
        }
    // -->
    </SCRIPT>
</HEAD>

<BODY>
    <PRE>
        MIME TYPE               SUFFIXES    DESCRIPTION
        ============            ========    ================
        application/vnd.fdf     fdf         AcroEx32 File
        application/pdf         pdf         Acrobat
    </PRE>

    <SCRIPT LANGUAGE="JavaScript">
    <!--
        if (pdf_flag == 1)
        {
            document.write("You have PDF<P>");
        }
        if (fdf_flag == 1)
        {
            document.write("You have FDF");
        }
    // -->
    </SCRIPT>
</BODY>
</HTML>

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -----Original Message-----
> From: Shawn Grover [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 4:07 PM
> To: CF-Talk
> Subject: OT: Detecting Acrobat?
>
>
> I'm sure someone has covered this before, but didn't have any
> luck searching
> the archives, and google has somewhat vauge results.
> I need to detect if Adobe Acrobat is installed on the user's
> browser (which
> will always be IE).
>
> I did find reference to a function that uses IsObject() in VBScript but
> haven't been able to make it work - it throws an error trying to create an
> activeX object.
>
> Anyone have any tips for doing this?  I'd prefer javascript, but will use
> what I can get. Thanks.
>
> Shawn Grover
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to