开发者

How can you tell if a user choose not to install a plug in?

I am not sure the user is going to install the plug in. They can choose n开发者_运维技巧ot to install. I need to know information like, install complete, or the user choose not to install. Any ideas?

Thanks, Grae


More context would be helpful in answering your question.

That said, if there's a particular plugin that you have in mind, you can do a post-install check* of simply trying to instantiate the object. This article has a pretty good description of what to do, but if you only care about IE and ActiveX plugins, then something like this should work well enough (untested):

function testPlugin(name)
{
    if (ActiveXObject)
    {
        try
        {
            return !!(new ActiveXObject(name));
        }
        catch (err) {}
    }
    return false;
}
​

and you could use that function to test whether or not, say, QuickTime is installed:

testPlugin('QuickTime.QuickTime');

*This will actually work at any time, not just after a possible plugin install

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜