Suppress security warning until ActiveX control is clicked?

B

Ben Katz

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top