DevKB
Web Development Knowledge Base
HOME | TOP 20 | WRITE AN ARTICLE |
Sections :



RSS RSS Feed

You too, please publish your useful code snippets in any programming language :
write an article !


Valid HTML 4.0 Transitional

Plateforme d'envoi de gros fichiers en ligne
Dépannage site web
Blog infogérance
Hébergement e-mail

Olivier Ligny - - 11/03/2008 - vue 3914 fois

Détection d'un plugin par son CLASSID

Voici comment détecter si un plugin est installé sur le client, en connaissant uniquement son CLASSID :

// Detection of an ActiveX plugin inside Internet Explorer on Windows
var result;
function IEDetectObject(ClassID)
{
result = false;
document.write('<'+'SCRIPT LANGUAGE=VBScript> n');
document.write('on error resume next n');
document.write('result = IsObject(CreateObject("' + ClassID + '")) n');
document.write('<'+'/SCRIPT> n');
return result;
}

alert("Plugin found ? "+IEDetectObject('D27CDB6E-AE6D-11cf-96B8-444553540000'));

Fonctionne sous Internet Explorer uniquement.
Pour FireFox, il y a navigator.plugins :-)




Write a comment :
Your name :     E-mail (optional) :

AntiSpam : what animal is visible on this picture ? :

Nos partenaires : iPhone 8 Cases & Protection