Javascript Code to determine through, if ActiveX is disabled in Internet Explorer (IE)
It is not possible to change the security settings in IE through javascript; otherwise it will defeat its purpose to save your PC from malicious code to run. However, you can check if the ActiveX is disabled by the user through javascript and accordingly can request user to enable it first.
var objShell;
try
{
objShell = new ActiveXObject("WScript.Shell");
}
catch(e)
{
//ActiveX is disabled or not allowed on prompt.
//Display instructions requesting user to modify settings.
}
try
{
objShell = new ActiveXObject("WScript.Shell");
}
catch(e)
{
//ActiveX is disabled or not allowed on prompt.
//Display instructions requesting user to modify settings.
}
Contents are compiled from different resources. Respective copyrights are acknowledged.
No comments:
Post a Comment