The About Plug-Ins Script : PlugIn : Development : JavaScript DHTML examples (example source code) Organized by topic

JavaScript DHTML
C++
PHP
JavaScript DHTML Home »  Development   » [  PlugIn  ]   
 



The About Plug-Ins Script

Please note that some example is only working under IE or Firefox.


/*
Mastering JavaScript, Premium Edition
by James Jaworski 

ISBN:078212819X
Publisher Sybex CopyRight 2001
*/

<HTML>
<HEAD>
<TITLE>About Plug-ins</TITLE>
</HEAD>
<BODY>
<SCRIPT language="javascript">
<!-- JavaScript to enumerate and display all installed
 plug-ins -->
numPlugins = navigator.plugins.length;
if (numPlugins > 0)
  document.writeln("<b><font size=+3>Installed plug-ins
   </font></b><br>");
else
 document.writeln("<b><font size=+2>No plug-ins are
  installed.</font></b><br>");
 document.writeln("For more information on Netscape
  plug-ins, <A HREF=http://home.netscape.com/comprod/
  products/navigator/version_2.0/plugins/index.html>
  click here</A>.<p><hr>");
for (i = 0; i < numPlugins; i++)
{
 plugin = navigator.plugins[i];
 document.write("<center><font size=+1><b>");
 document.write(plugin.name);
 document.writeln("</b></font></center><br>");
 document.writeln("<dl>");
 document.writeln("<dd>File name:");
 document.write(plugin.filename);
 document.write("<dd><br>");
 document.write(plugin.description);
 document.writeln("</dl>");
 document.writeln("<p>");
 document.writeln("<table width=100% border=2 cellpadding=5>");
 document.writeln("<tr>");
 document.writeln("<th width=20%><font size=-1>Mime Type</font>
  </th>");
 document.writeln("<th width=50%><font size=-1>Description
  </font></th>");
 document.writeln("<th width=20%><font size=-1>Suffixes</font>
  </th>");
 document.writeln("<th><font size=-1>Enabled</th>");
 document.writeln("</tr>");
 numTypes = plugin.length;
 for (j = 0; j < numTypes; j++)
 {
  mimetype = plugin[j];
 
  if (mimetype)
  {
   enabled = "No";
   enabledPlugin = mimetype.enabledPlugin;
   if (enabledPlugin && (enabledPlugin.name == plugin.name))
    enabled = "Yes";
   document.writeln("<tr align=center>");
   document.writeln("<td>");
   document.write(mimetype.type);
   document.writeln("</td>");
   document.writeln("<td>");
   document.write(mimetype.description);
   document.writeln("</td>");
   document.writeln("<td>");
   document.write(mimetype.suffixes);
   document.writeln("</td>");
   document.writeln("<td>");
   document.writeln(enabled);
   document.writeln("</td>");
   document.writeln("</tr>");
  }
 }
   
 document.write("</table>");
 document.write("<p><hr><p>");
}
</SCRIPT>
</BODY>
</HTML>
           
       
Related examples in the same category
1.   Listing Plug-In Properties
2.  Synchronizing Two Plug-Ins
3.   Accessing a Plug-In
4.  Determining Whether the LiveVideo Plug-In Is Installed
5.  Displaying Plug-In Information
6.  Display PDF using plugin
7.  Find pluin for Midi
8.  Scan through each plug-in by provided parameters
9.  Displaying a List of Navigator Plug-Ins
10.  Properties of the Plugin Object
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.