views:

103

answers:

1

Hi, Is there any way to achieve this?

Regards, Manoj

A: 

Assuming your add-on is registered as an ActiveX component, you can just try to instantiate an instance of it. If it succeeds it is installed, if it throws an exception it is not installed. Something like the following:

<body>
<pre>
<script type="text/javascript">
try {
    new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
    document.writeln("ShockwaveFlash is installed");
} catch (err) {
    document.writeln("ShockwaveFlash is not installed");
}
// OR
try {
    new ActiveXObject("AcroPDF.PDF");
    document.writeln("Adobe Reader is installed");
} catch (err) {
    document.writeln("Adobe Reader is not installed");
}
</script>
</pre>
</body>
Grant Wagner