Windows Scripting
  Home arrow Windows Scripting arrow Page 2 - Detecting Plugins in Internet Explorer
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

Detecting Plugins in Internet Explorer
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 28
    2005-04-18

    Table of Contents:
  • Detecting Plugins in Internet Explorer
  • How Navigator Handles the Problem
  • IE's Approach
  • Getting started
  • The heart of plug-in detection
  • Displaying the results
  • Extending the Script

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Detecting Plugins in Internet Explorer - How Navigator Handles the Problem


    (Page 2 of 7 )

       

    Netscape Navigator tackles this problem by using an array built directly into the browser object, called simply plugin (navigator.plugins), that lists all of the plug-ins installed in the browser. This array can then be accessed quickly and efficiently through the use of the ever-popular scripting language JavaScript, provided version 1.1 or above is supported. A simple document that makes use of the .plugins property can be put together as follows:

    <html>

    <head>

    <title>Netscape Plugin Detection</title>

    </head>

    <body>

    <h1>The plugins you have installed are:</h1>

    <script language='JavaScript'>

      if (navigator.plugins){

        for (i=0; i < navigator.plugins.length; i++){

        document.writeln("Plugin Name: " + navigator.plugins[i].name + "<br>");

        }

      }

    </script>

    </body>

    It is messy, in part because some of the plug-ins are listed more than once, but it works with a minimal amount of effort. The plugins array has some additional properties such as .filename and .description, which provide, yes, you’ve guess it, information on the filename of the plug-in, and a brief description of the plug-in, such as:

    Plugin Filename: npswf32.dll
    Plugin Description: Shockwave Flash 7.0 r19
        

    More Windows Scripting Articles
    More By Dan Wellman


       · Thanks for the article. Its a big help, confirmed my suspicions that yet again IE is...
       · Thanks, I'm glad the article helped
       · createObject("Word.Application") will actually fire up WINWORD.EXE in the...
       · Interesting, thanks for pointing that out AllanDan
     

    WINDOWS SCRIPTING ARTICLES

    - Introducing Two-Way Data Binding using Silve...
    - Silverlight 2.0 Application Development with...
    - Burning Multisession CDs with IMAPI2 in WSH
    - Creating a Silverlight 2.0 Application that ...
    - Burning CDs with the IMAPI2 Control
    - Burning CDs in Windows XP with WSH
    - Advanced Word Object Scripting
    - Reading and Printing Word Documents in WSH
    - Scripting Microsoft Word
    - Using WSH to Catalog MP3 Files
    - Reading MP3 ID3 Tags in WSH
    - A Brief Look at Menus in WPF
    - More Examples of Simplified Image Processing...
    - Completing a WPF To-Do List Application
    - Simplified Image Processing in GDI+





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT