Re: How to avoid warning after "MyObject=new ActiveXObject(...)"

From: Marcelo J. Birnbach (
Date: 02/13/03

From: "Marcelo J. Birnbach" <>
Date: Thu, 13 Feb 2003 14:37:45 -0800

You can embed the control in your page and it's going to be created without
the need of calling new ActiveXObject by adding this html code:

<OBJECT id=mycontrol classid="control1.dll#Control1">

You DON'T even need to register the control as an ActiveX.

Then, inside your page you can reference at the control by its id:

For example:

<script language="JavaScript">

function Test()
     var res = mycontrol.Test();


Let me know if you have any question.


"Nikolay Seksenov" <> wrote in message
> I have created a dll which I call from one of our
> intranet html pages. To instantiate this dll in html page
> I am using the following javascript statement:
> "MyObject=new ActiveXObject("MyDll.MyClass");"
> Execution of this line causes the warning: "An ActiveX
> control on this page might be unsafe to interact with
> other parts of the page. Do you want to allow this
> interaction?". After answering "Yes" everything works
> fine. Is there any way to avoid this warning?
> I have read some articles about safe and signed code but
> still can't find the answer.