473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Can javascript call a MS Windows COM object?

Hello

Can javascript call/reference COM object. VBScript can do this (as it is
from Microsoft). Can javascript? If so how?

Angus
Jan 30 '06 #1
3 6270
Angus Comber wrote:
Hello

Can javascript call/reference COM object. VBScript can do this (as it is
from Microsoft). Can javascript? If so how?

Angus


No different that VBScript, JScript can automate any COM object with
IDispatch interface. Search for Windows Scripting Host (or WSH).

However, this is subject to security rules when JavaScript is hosted in
Internet Explorer.

JavaScript (as defined in ECMA specification) cannot automate COM object.
Jan 31 '06 #2
Roman wrote:
Angus Comber wrote:
Can javascript call/reference COM object. VBScript can do this (as it is
from Microsoft). Can javascript? If so how?
[...]
No different that VBScript, JScript can automate any COM object with
IDispatch interface. Search for Windows Scripting Host (or WSH).


The Windows Script Host (formerly: Windows Scripting Host) does not have
much to do with this. Use of ActiveX/COM is not restricted to that; one
could say, unfortunately, considering the number of security leaks and
therefore, security patches for Windows systems and Internet Explorer
required because of this during the years.
However, this is subject to security rules when JavaScript is hosted in
Internet Explorer.
True.
JavaScript (as defined in ECMA specification) cannot automate COM object.


That is not quite correct. What is important in answering this question
properly is: Does the UA's AOM/DOM expose means to access ActiveX/DOM
objects, and if yes, which?

Therefore, it is incorrect to say that JavaScript cannot automate COM
objects. Netscape (all versions) on Windows can automate the ActiveX/COM
object of the Windows Media Player, and with the ActiveX Plugin installed,
all Mozilla browsers (NN4+, Gecko-based browsers) can automate probably all
ActiveX/COM objects. Of course, the scripting language they support do to
so is (Netscape) JavaScript.

BTW: Please learn to quote.
PointedEars
Jan 31 '06 #3
Roman wrote:
JavaScript (as defined in ECMA specification) cannot automate COM object.


I forgot to mention that both JavaScript 1.1 and 1.3+. and JScript are fully
compliant ECMAScript implementations, and JavaScript is not "defined in
ECMA specification".
PointedEars
Feb 1 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.