2

At the moment I have a custom ActiveX plugin that drops down the usual yellow bar with the install button if the user doesn't have it. When they finish installing, however, I need the page to automatically refresh. Is there a way to detect that the plugin has been successfully installed that isn't constantly polling for the plugin's presence. That is to say, not doing this:

function checkForPlugin() {
    try {
            control = new ActiveXObject('Object.One');
            //refresh
    } catch (e) {
            setTimeout("checkForPlugin()" ,2000);
    }
}

This doesn't seem terribly professional and I'm curious if there is a better approach I could be taking. Come to think of it...I'm not exactly sure how I'd refresh there anyway, does anyone have insight on that as well? Thanks.

Update -- I have it working using the above method and even solved the refresh issue. I'm really not thrilled with this as an implementation though. It just feels wrong to leave the browser sitting there constantly polling in the background until it gets what it wants. It's not terrible I guess but I wish there was a more clean approach. Does anyone have any ideas?

0

3 Answers 3

0

You could have your control fire an event and listen for it.

0

I think, capturing ActiveX install finish event is a kind of misconception.

Basically web pages run in single thread. There are no asynchronous processing such as a background installing.

In a life time of a web page, you will have the already installed ActiveX control or nothing. If control = new ActiveXObject throws, never you can instantiate the ActiveX control in this life time of the page.

That is, if the ActiveX control is not installed already you need to refresh the page to use the newly installed ActiveX control. This refresh is done automatically by the IE.

0

While the two answers given are perfectly valid, neither solution will really work within my time constraint or implementation. I thank you both for answering but ultimately I went with as described in my question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.