memilavi
asked on
Use activeX in HTML
Hi guys.
I'm trying to use the OBJECT tag in my HTML, but the object does not created.
When I'm trying to create it using the 'createObejct' statement (of VBScript), it works fine.
When I look at the "CodeDownloadErrorLog" file, I see the problem is: "Class not registered (80040154)"
I know for sure the class IS registered (I can instantiate it using vbscript).
What is the problem?
Thanks!
I'm trying to use the OBJECT tag in my HTML, but the object does not created.
When I'm trying to create it using the 'createObejct' statement (of VBScript), it works fine.
When I look at the "CodeDownloadErrorLog" file, I see the problem is: "Class not registered (80040154)"
I know for sure the class IS registered (I can instantiate it using vbscript).
What is the problem?
Thanks!
ASKER
Well, in this case, how can I capture events from an object created by CreateObject?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To create an Automation object in JavaScript, assign the new ActiveXObject to an object variable, f.e.:
var ExcelSheet;
ExcelSheet = new ActiveXObject("Excel.Sheet ");
var ExcelSheet;
ExcelSheet = new ActiveXObject("Excel.Sheet
ASKER
hakob, maybe you didn't understand my question.
I asked how to capture events from an automation object, not how to create it.
Perhaps you are new here, but next time don't lock a question. If your comment is actually the answer, it will be accepted as such.
CJ, I am currently checking your suggestion. I will come up with results ASAP.
I asked how to capture events from an automation object, not how to create it.
Perhaps you are new here, but next time don't lock a question. If your comment is actually the answer, it will be accepted as such.
CJ, I am currently checking your suggestion. I will come up with results ASAP.
Let me know. After tomorrow I won't be on for a week (or so)...
regards,
CJ
regards,
CJ
actually, an object doesn't neccessarily need to have a GUI of its own. I have created few objects that doesn't have a GUI but exposes its IDispatch interface so that I can use it for automation.
as for as events go the standard method of handling events given an object like "window" you do the following
<script language="vbscript">
sub window_onload
MsgBox "hello world"
end sub
</script>
refer to this document for more,
http://msdn.microsoft.com/library/en-us/dnclinic/html/scripting04092001.asp?frame=true
as for as events go the standard method of handling events given an object like "window" you do the following
<script language="vbscript">
sub window_onload
MsgBox "hello world"
end sub
</script>
refer to this document for more,
http://msdn.microsoft.com/library/en-us/dnclinic/html/scripting04092001.asp?frame=true
djbusychild,
you do need a GUI for objects within the object-tag. I might be very well wrong, but I never could use the object-tag with plain components exposing the IDispatch and IUnknown interfaces (without a GUI).
Regards,
CJ
you do need a GUI for objects within the object-tag. I might be very well wrong, but I never could use the object-tag with plain components exposing the IDispatch and IUnknown interfaces (without a GUI).
Regards,
CJ
ASKER
Thanks, CJ_S, that was exactly what I needed to know.
I have another question regarding objects in HTML, and I hope you can help me with this too.
Look in the questions list for that.
I have another question regarding objects in HTML, and I hope you can help me with this too.
Look in the questions list for that.
With other words, I'm not surprised.
regards,
CJ