Suppress security warning until ActiveX control is clicked?

Discussion in 'Javascript' started by Ben Katz, Jul 29, 2003.

  1. Ben Katz

    Ben Katz Guest

    I created an ActiveX control that displays the security warning the
    first time the user sees the control (as it should)

    I wonder if there's a way to suppress the security warning until a new
    user elects to use the activeX control (by clicking it, etc.)

    That way, people who never intend to use it will not be bothered by
    pop-ups, but people who want to use it will of course have to give the
    OK the first time.

    Here's what I tried:
    1. Using the <object declare...> syntax to cache the activex control
    but not display it till a phony image was clicked on. (In this trial,
    the control simply appeared as normal)
    2. Using JavaScript to insert the <object> tag into a span tag's
    inner or outer html when a phony image was clicked on. (In this trial,
    the span's html refused to change without error when I clicked.)
    3. Using this code:

    <SPAN ONCLICK="replace(this);">Click Here for activeX</SPAN>
    <SCRIPT LANGUAGE="JavaScript">
    function replace(item)
    {
    var elem = document.createElement("OBJECT");
    elem.setAttribute("id", "PNR1");
    elem.setAttribute("codebase", "http://www.....");
    elem.setAttribute("classid", "CLSID:....");
    item.appendChild(elem);
    }
    </SCRIPT>


    The third one almost worked, as it made the "failed activex control"
    square appear on the document. But, it did not load my control.

    Any other ideas?
    Ben Katz, Jul 29, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christian Seberino
    Replies:
    0
    Views:
    341
    Christian Seberino
    Oct 21, 2003
  2. vml
    Replies:
    0
    Views:
    1,021
  3. Replies:
    1
    Views:
    381
    =?Utf-8?B?TGFkaXNsYXYgTXJua2E=?=
    Aug 22, 2007
  4. Suresh Reddy
    Replies:
    2
    Views:
    320
    Suresh Reddy
    Apr 21, 2008
  5. Betty
    Replies:
    3
    Views:
    567
    Cubaman
    Jul 28, 2010
Loading...

Share This Page