internet explorer - How to check for the presence of a specific version of flash player, when the system has many versions with same "Major Version", (in javascript)? -


i have check if specific version of flash player 10.2.161.23 installed on client's machine or not javascript code. client's system has many other versions same "major version" 10.1.102.64 etc.. tried following code snippet

for(var = 10; > 0; i--)           {                 try             {                      flash = new activexobject("shockwaveflash.shockwaveflash."+string(i));                 }             catch(e)             {               alert("in ctach");             }               version = flash.getvariable("$version");                    alert(version);          } 

client has 10.1.102.64 & 10.2.161.23 on system , above code recognizing only, 10.1.102.64 not recognizing other version same "major version no:".

can use new activexobject("macromediaflashpaper.macromediaflashpaper"); instead of shockwaveflash.shockwaveflash. have impact? flash player version want detect 64 bit version.

can kindly let me know reason , fix please. in advance.

try following script

function getflashversion(){   // ie   try {     try {       // avoid fp6 minor version lookup issues       // see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/       var axo = new activexobject('shockwaveflash.shockwaveflash.6');       try { axo.allowscriptaccess = 'always'; }       catch(e) { return '6,0,0'; }     } catch(e) {}     return new activexobject('shockwaveflash.shockwaveflash').getvariable('$version').replace(/\d+/g, ',').match(/^,?(.+),?$/)[1];   // other browsers   } catch(e) {     try {       if(navigator.mimetypes["application/x-shockwave-flash"].enabledplugin){         return (navigator.plugins["shockwave flash 2.0"] || navigator.plugins["shockwave flash"]).description.replace(/\d+/g, ",").match(/^,?(.+),?$/)[1];       }     } catch(e) {}   }   return '0,0,0'; }  var version = getflashversion().split(',').shift(); if(version < 10){   alert("lower 10"); }else{   alert("10 or higher"); } 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -