Thread: Detect plug-in

    #1
  1. No Profile Picture
    Damian
    Guest
    Devshed Newbie (0 - 499 posts)
    How can I detect if a plug-in is in the client-browser??

    I need to change between a gif image an a flash object, in order the flash plug-in is oris not in the client browser

    Thanks!
  2. #2
  3. No Profile Picture
    Spookster
    Guest
    Devshed Newbie (0 - 499 posts)
    This will detect if flash is present in Netscape but for IE things work differerntly for detection since they use Active X. Here is for NS:

    <HTML>
    <HEAD>
    <TITLE>Detecting Plugins</TITLE>

    <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
    <!-- Hide script from old browsers
    present = navigator.mimeTypes["application/x-shockwave-flash"];

    if (present)
    document.write("You have plugin");
    else
    document.write("You dont have plugin");

    // End hiding script from old browsers -->

    </SCRIPT>
    </HEAD>
    <BODY>
    </BODY>
    </HTML>

    You can also use navigator.plugins["name of plugin"] to detect the plugin but you need to know the name of the plugin. Still this only works in NS. Cant help you on IE.

    Spookster
  4. #3
  5. No Profile Picture
    cruzan
    Guest
    Devshed Newbie (0 - 499 posts)
    At http://www.hotwired.com/webmonkey/javascript/code_library/
    you can find a nice vbscript that checks out plugins (flash, shockwave, real, quicktime) and then you can redirect or do a document.write(). This one works very well with IE5 and no complaints yet from IE4 folks. I dont know about Netscape but it does have coding to check Netscape so assume it works (if statement).

Similar Threads

  1. How to connect 1394 card with plug on case front panel?
    By hugo0000 in forum Computer Hardware
    Replies: 5
    Last Post: February 4th, 2005, 04:41 AM
  2. How to connect 1394 card with plug on case front panel?
    By hugo0000 in forum Computer Hardware
    Replies: 0
    Last Post: December 17th, 2003, 10:56 AM
  3. Javascript that will detect continuous streaming video
    By linh in forum JavaScript Development
    Replies: 0
    Last Post: December 16th, 2003, 04:44 PM
  4. Replies: 0
    Last Post: July 19th, 2003, 07:29 PM
  5. Dreamweaver plug in question
    By kfickert in forum HTML Programming
    Replies: 0
    Last Post: October 4th, 2002, 06:12 AM

IMN logo majestic logo threadwatch logo seochat tools logo