5

I would like to integrate the Aurigma image uploader (http://www.aurigma.com/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?

  • 1
    I'd strongly recommend 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 compromise 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 Jan 29 '10 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 recommend? – Silvan Mühlemann Jan 29 '10 at 20:09
  • Some suggestions here: http://stackoverflow.com/questions/207298/what-is-the-best-multiple-file-javascript-flash-file-uploader – bobince Jan 29 '10 at 22:06

1 Answers1

7

Assuming you have the id of the object tag (if it is coming 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.

tyranid
  • 13,028
  • 1
  • 32
  • 34