admin管理员组

文章数量:1323348

I would like to integrate the Aurigma image uploader (/) on a website.

On Internet Explorer the control is an ActiveX control which issues a security prompt prior to the first installation.

To give the user instructions about how to react to this security warning I'd like to display an information window. I want to display this window only the control is not loaded.

  if (controlIsNotLoaded()) {
    doSomething()
  }

How can I do that?

I would like to integrate the Aurigma image uploader (http://www.aurigma./Products/ImageUploader/) on a website.

On Internet Explorer the control is an ActiveX control which issues a security prompt prior to the first installation.

To give the user instructions about how to react to this security warning I'd like to display an information window. I want to display this window only the control is not loaded.

  if (controlIsNotLoaded()) {
    doSomething()
  }

How can I do that?

Share Improve this question asked Jan 29, 2010 at 15:41 Silvan MühlemannSilvan Mühlemann 5806 silver badges15 bronze badges 3
  • 1 I'd strongly remend using a Flash uploader (with HTML backup) in preference to custom ActiveX controls. User acceptance is much, much higher and you won't be asking people to promise security by trusting a new third-party plugin. Aurigma certainly has had multiple vulnerabilities in the past; there's no way I'd let it run on my machine. Also there is no built-in HTML fallback so you could only offer it as a optional extra upload mechanism. – bobince Commented Jan 29, 2010 at 16:57
  • @bobince: Thanks for the advice. I'd be much happier to use a flash based uploader. Is there one that you can remend? – Silvan Mühlemann Commented Jan 29, 2010 at 20:09
  • Some suggestions here: stackoverflow./questions/207298/… – bobince Commented Jan 29, 2010 at 22:06
Add a ment  | 

1 Answer 1

Reset to default 7

Assuming you have the id of the object tag (if it is ing from that) then test for the object attribute of the element against null.

function controlNotLoaded()
{
     var obj = document.getElementById("controlId");
     return (obj.object == null);
}

If you are using new ActiveXObject then it will throw an exception. Of course this will only tell you if the control isn't able to be created, not necessarily why.

本文标签: javascriptHow can I detect if an ActiveX control is loadedStack Overflow