How to use a COM Object in a HTML page?

J

JAYO

I've a COM object with methods. I want an implementation in a HTML for
using with a java script function. I know that there is an 'OBJECT
TAG'. I think that i can use the COM object with this TAG. How to
create and implement the object?, How to use their methods in the HTML
page?, How to use in a javascript function?

Thank you very much in advance.
 
J

Joel Shepherd

JAYO said:
I've a COM object with methods. I want an implementation in a HTML for
using with a java script function. I know that there is an 'OBJECT
TAG'. I think that i can use the COM object with this TAG. How to
create and implement the object?, How to use their methods in the HTML
page?, How to use in a javascript function?

You might take a gander at these:

http://www.faqts.com/knowledge_base/view.phtml/aid/9230
http://www.webreference.com/js/column55/activex.html
http://www.c-point.com/javascript_tutorial/jsobjActiveXObject.htm

As one site says, doing this is "totally non-portable". I.e., if you can
get it to do what you need on IE, consider yourself lucky. Anything more
than that is probably a pipe dream.
 
A

Andy Dingley

JAYO said:
I've a COM object with methods. I want an implementation in a HTML for
using with a java script function.

You can't use JavaScript with COM, you have to use M$oft's proprietary
JScript (the same thing, but with COM)
It all works fine and you'll find it described on many M$oft resources.
I suggest searching through MSDN for starters.

The downside is:
- It's heavily IE and Windows specific. You can forget it for any
other platform.

- Sensible browser users don't allow random COM components to be
deployed to their machines, because of security issues. Even signing
them doesn't change this.

I doubt very much if you need this COM object at all in anything that's
really a "web page". Even if you need something that's more than HTML
can provide, using AJAX is a much more standardised and easily deployed
way to achieve the same results. If you can't do it by AJAX, you
probably shouldn't be trying to do it in a web browser, it belongs as a
desktop app instead.

If you're on a tightly controlled intranet then you might be able to
use it, but not on teh intawebs at large.
 
J

J.O. Aho

JAYO said:
I've a COM object with methods. I want an implementation in a HTML for
using with a java script function. I know that there is an 'OBJECT
TAG'. I think that i can use the COM object with this TAG. How to
create and implement the object?, How to use their methods in the HTML
page?, How to use in a javascript function?

I would suggest you redo your project, so it don't need to use any COM
objects, this for making the web page to work as many browsers and platforms
as possible.

Of course if you make it for your own fun and use, then you can use that COM
stuff, I think Joel did give good pointers where to look.
 

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
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top