How can I detect the version of Plugin in Internet Explorer?

Discussion in 'Javascript' started by Yurij Nykon, May 6, 2004.

  1. Yurij Nykon

    Yurij Nykon Guest

    Hi all.

    How can I detect the version of Flash-Plugin installed in Internet
    Explorer?
    In Netscape i can do this with following java script
    navigator.plugins[pluginname].description
    But it doesn't works in IE?
    Can anyone help me?

    Thanx in advance,
    Yurij
     
    Yurij Nykon, May 6, 2004
    #1
    1. Advertising

  2. > How can I detect the version of Flash-Plugin installed in Internet
    > Explorer?


    Plugins are different for ie... I would embed some vbscript in your
    javascript, and use object detection with vb. Here is a snip from a
    page I did awhile ago, that will not work as is, but will give you the
    idea...

    // IE Plugin detection (using VBSCRIPT)
    if( (wm.name=="IE") && (wm.version>=4.0) && (wm.platform=="Win32") )
    {
    document.writeln('<SCRIPT LANGUAGE="VBSCRIPT"
    TYPE="TEXT/VBSCRIPT">')
    document.writeln(' Function DetectObject(activeXname)')
    document.writeln(' on error resume next')
    document.writeln(' FoundStatus = False')
    document.writeln(' FoundStatus =
    IsObject(CreateObject(activeXname))')
    document.writeln(' If (err) then')
    document.writeln(' FoundStatus = False')
    document.writeln(' End If')
    document.writeln(' DetectObject = FoundStatus')
    document.writeln(' End Function')
    document.writeln(' PluginStatus =
    DetectObject("ShockwaveFlash.ShockwaveFlash.5")')
    document.writeln(' If PluginStatus = True Then')
    document.writeln(' wm.flash = 5')
    document.writeln(' Else')
    document.writeln(' PluginStatus =
    DetectObject("ShockwaveFlash.ShockwaveFlash.4") ')
    document.writeln(' If PluginStatus = True Then')
    document.writeln(' wm.flash = 4')
    document.writeln(' Else')
    document.writeln(' PluginStatus =
    DetectObject("ShockwaveFlash.ShockwaveFlash.3")')
    document.writeln(' If PluginStatus = True Then')
    document.writeln(' wm.flash = 3')
    document.writeln(' End If ')
    document.writeln(' End If')
    document.writeln(' End If')
    document.writeln(' PluginStatus =
    DetectObject("QuickTimeCheckObject.QuickTimeCheck")')
    document.writeln(' If PluginStatus = True Then')
    document.writeln(' wm.quicktime = 1')
    document.writeln(' End If ')
    document.writeln(' PluginStatus = DetectObject("RealPlayer")')
    document.writeln(' If PluginStatus = True Then')
    document.writeln(' wm.realplayer = 1')
    document.writeln(' End If ')
    document.writeln('</SCRIPT>')
    }

    The first part

    if( (wm.name=="IE") && (wm.version>=4.0) && (wm.platform=="Win32") )

    uses already detected settings to make sure that the browser is IE,
    the version is greater than 4, and the OS is a windows platform. If
    it is, it does the inline vbscript (I already described) to try and
    create and test the object.

    This code also tests for quicktime and realplayer.

    I hope this code helps... keep in mind though, it is 3 or so years out
    of date. It only tests for up to version 5 of Flash. But if you know
    javascript it should be easy to modify it to get it to test for newer
    versions. Also, you will have to change all of the "wm."
    references... (this script used a custom-made object -- wm -- and
    defined a bunch of browser settings which I set into a cookie...)

    Hope it helps!

    Holden
    PS: As for IE on Macs, I don't think there is anything you can do.
    Luckily, IE on Windows covers over 90% of the computers out there...
     
    Holden Caulfield, May 6, 2004
    #2
    1. Advertising

  3. Yurij Nykon

    Grant Wagner Guest

    Yurij Nykon wrote:

    > Hi all.
    >
    > How can I detect the version of Flash-Plugin installed in Internet
    > Explorer?
    > In Netscape i can do this with following java script
    > navigator.plugins[pluginname].description
    > But it doesn't works in IE?
    > Can anyone help me?
    >
    > Thanx in advance,
    > Yurij


    <url:
    http://www.google.com/search?q=internet explorer javascript detect flash
    />

    Second link produced is:

    <url:
    http://www.macromedia.com/support/flash/ts/documents/scriptfree_detection.htm
    />

    which describes how to detect Flash using Flash itself. If that doesn't
    suit you, there is a link to:

    <url:
    http://www.macromedia.com/support/flash/ts/documents/uber_detection.htm
    />

    which contains the following paragraph:

    "Note: The Macromedia Flash deployment kit is a complete Flash Player
    detection system that meets the needs of most developers. If you have a
    specific detection requirements, the methods discussed in the rest of
    this TechNote may prove useful. Otherwise, download and install the
    deployment kit."

    There are links in that paragraph to the Flash deployment kit.

    --
    | Grant Wagner <>

    * Client-side Javascript and Netscape 4 DOM Reference available at:
    *
    http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

    * Internet Explorer DOM Reference available at:
    *
    http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

    * Netscape 6/7 DOM Reference available at:
    * http://www.mozilla.org/docs/dom/domref/
    * Tips for upgrading JavaScript for Netscape 7 / Mozilla
    * http://www.mozilla.org/docs/web-developer/upgrade_2.html
     
    Grant Wagner, May 6, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PilotYid
    Replies:
    1
    Views:
    681
    Andrew Thompson
    Oct 31, 2005
  2. bruce
    Replies:
    0
    Views:
    399
    bruce
    Apr 23, 2005
  3. Marcus Goldfish

    Re: internet explorer/firefox plugin/toolbar

    Marcus Goldfish, Apr 23, 2005, in forum: Python
    Replies:
    0
    Views:
    396
    Marcus Goldfish
    Apr 23, 2005
  4. focode
    Replies:
    2
    Views:
    693
  5. V Green
    Replies:
    0
    Views:
    929
    V Green
    Feb 5, 2008
Loading...

Share This Page