View Single Post
  #6 (permalink)  
Old February 11th, 2005, 07:42 AM
joefawcett's Avatar
joefawcett joefawcett is offline
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

The author of that script is under the misapprehension that you need VBScript in IE to check for Flash, you don't. You can use:
Code:
function hasFlash(Version)
{
  var sVersion = (Version ? "." + Version : "");
  try
  {
    var oFlash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash" + sVersion);
    oFlash = null;
  }
  catch(e)
  {
    return false;
  }
  return true;
}
If you pass a version it will test for that version otherwise just for flash in general.

The problem is that it maybe that they have flash but thier security settings either disallow scripting or just disallow object scripting.

--

Joe (Microsoft MVP - XML)
Reply With Quote