Click to See Complete Forum and Search --> : ActiveXObject


Hambi
September 6th, 2002, 05:29 AM
Hello!

I have ASP and in it a function declared:

<script language=JavaScript>
function AAA(strParams)
{
var obj;
try
{
obj = new ActiveXObject("ActiveXDLL.someclass");
}
catch(e)
{
throw(e)
}
}
</script>

but it thows error message
"Automation server can't create object".
But if i create object in ASP code is OK.
I also create some Sub in VBScript and it doesn't work.

I need this function on the client side.
Client and server are local machine.

What is wrong, please help me!
Tnx

ShawnDev
September 8th, 2002, 07:38 PM
ActiveXObject() appears to be a part of Microsoft's JScript language (which imitates, but isn't quite the same as, Javascript). First off, you'd have to declare language="JScript" (instead of "Javascript") and I imagine that it would only work [properly] in Internet Explorer.

Second, the ActiveX object (whatever it is - Word, Excel or something you created yourself) needs to exist (and be registered - see the command-line utility regsvr32) on the client machine.