views:

272

answers:

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?

A: 

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
This is still instantiating the object
Danny G