Creating a COM object in JavaScript

Hello

I have created a component in C++ using COM. I need to use this component in javascript. But I am getting an error message as shown below:

Error:

Automation Server cannot create object

Code Snapshot

<html>

<head>

<meta http-equiv="Content-Type"

content="text/html; charset=iso-8859-1">

<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">

<title></title>

<STYLE TYPE ="text/css">

</STYLE>

<script language="javascript">

function function1()

{

var myObj = new ActiveXObject("ToolBand.ToolBandObj");

myObj.OnNag("fg"); // Component's Function

}

</script>

</head>

<body bgcolor="#FFD7OO" text="#8OOO8O" id="theBody">

<button name="i" onclick = "function1();">Hello</button>

</body>

</html>

Here "ToolBand.ToolBandObj" is a C++ COM Object.

Please kindly let me know how to create an instance of COM object in JavaScript

Regards

Senthil

[1080 byte] By [DevSenthila] at [2007-11-27 11:23:52]
# 1

I guess, code is okay. Check your IE "Security Settings". Have you enabled ActiveX related options?

skp71a at 2007-7-29 15:54:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

I have enabled the Activex setting in IE . But my component is not an Activex Component .

Please let me know how to call a COM object in javascript

DevSenthila at 2007-7-29 15:54:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...