Alex Rivera | Logout

How can I detect if Flash is installed and if not, display a hidden div that informs the user?

Asked 2009-06-15T20:38:13.073
88

How can I use javascript/jQuery/etc to detect if Flash is installed and if it isn't, display a div that contains information informing the user that they need to install flash?

Edit
Report

2 Answers

26

Use swfobject. it replaces a div with the flash if it is installed. see: http://code.google.com/p/swfobject/

answered 2009-06-15T20:40:12.677
18

You can use navigator.mimeTypes.

if (navigator.mimeTypes ["application/x-shockwave-flash"] == undefined)
    $("#someDiv").show ();
answered 2009-06-15T20:44:19.597

Your Answer