2

http://www.javascriptkit.com/script/script2/plugindetect.shtml

I am trying to detect flash plugin with Javascript from the above url, but the code doesn't seem to work for IE. Am I doing anything wrong here?

I just need to see whether the flash plugin is installed on the browser or not.

if (pluginlist.indexOf("Flash")== -1)
{
  alert("You do not have flash player plugin installed.Please install flash player");
  window.location = "/home";
}
2

3 Answers 3

1

swfobject is the established quasi-standard for dealing with flash in JavaScript.

There's a tutorial for Detecting Flash Player versions and embedding SWF files with SWFObject 2

Sign up to request clarification or add additional context in comments.

1 Comment

This tutorial was removed
1

i too tried the same flash plugin but in different link. I tried the following javascript code:

<script type="text/javascript" src="swfobject.js"></script>

<div id="flashcontent">
  This text is replaced by the Flash movie.
</div>

<script type="text/javascript">
   var so =
       new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
   so.write("flashcontent");
</script>

Prepare an HTML element that will hold our Flash movie. The content placed in the ‘holder’ element will be replaced by the Flash content, so users with the Flash plug-in installed will never see the content inside this element. This feature has the added bonus of letting search engines index your alternate content.

var so = new SWFObject(swf, id, width, height, version, background-color
         [, quality, xiRedirectUrl, redirectUrl, detectKey]);

And get succeeded. You can also try this code and tell me what happens. I hope you will get success. All The Best.

Comments

0

I tried to use the same plugin of the link you posted.

I used following code and it worked fine in my IE too..

<html>
    <head>

        <script language="javascript" type="text/javascript" src="plugins.js" ></script>

        <script language="javascript" type="text/javascript">
            if (pluginlist.indexOf("Flash")== -1)
            {
              alert("You do not have flash player plugin installed.Please install flash player");
              window.location = "/home";
            }
            else{
                alert("You have it installed");
            }
        </script>
    </head>

    <body>


    </body>
</html>

I think the problem seems with the way of writing tag. Have you made it exactly like mine? Or you can go with my HTML.

Thanks!

Hussain

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.