1

Normally when you use VBScript or JavaScript to CreateObject to detect a plug-in, the user gets the somewhat "jarring" security exception.

What are some good ways to detect IE browser plugins without actually instantiating the object?

Danny G
  • 3,450
  • 3
  • 34
  • 48

1 Answers1

-1

While I am not sure of a way to check withing creating the object, you can still get around the security exceptions by using the javascript try-catch block.

For example:

function checkForObject() {
   try{
      var conn = new ActiveXObject('Msxml2.XMLHTTP');
      return true;
   } catch (e) {
      return false;
   }
}

In this case, the actual error is captured and hidden from the user.

Mike Clark
  • 11,179
  • 6
  • 36
  • 42