Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Detect the existence of a particular ActiveX on the client's browser in IE5

27 views
Skip to first unread message

P.T.Gowadia

unread,
Jan 30, 2002, 4:32:32 AM1/30/02
to
I need to detect the existence of a particular ActiveX (Microsoft
Office Web Components) on the clients browser.ALl the clients use IE5
or IE5.5.
Can anyone direct me to the relevant objects/methods/properties?Or if
there is a pre-existing library, direct me to it?
Thanks in advance for your help.
P.T.Gowadia

Dan

unread,
Feb 3, 2002, 1:39:30 PM2/3/02
to
Perhaps you could create a variable objAX to represent the active x
component and test
(typeof(objAX) == "object") perhaps within a try and catch?

"P.T.Gowadia" <gow...@operamail.com> wrote in message
news:9dac1967.0201...@posting.google.com...

P.T.Gowadia

unread,
Feb 4, 2002, 1:06:09 AM2/4/02
to
"Dan" <dfoxm...@hotmail.com> wrote in message news:<Tsf78.2157$vd4.3...@news11-gui.server.ntli.net>...

> Perhaps you could create a variable objAX to represent the active x
> component and test
> (typeof(objAX) == "object") perhaps within a try and catch?
Can you please explain further as I don't know much about handling
Objects in Javscript.In particular, can you give some code
(explanatory).
Thank you for the help already given.
P.T.Gowadia

Holden Caulfield

unread,
Feb 4, 2002, 12:51:14 PM2/4/02
to
Hi there -- here is a fragmnt of code I used to do the same thing
awhile ago...

<SCRIPT LANGUAGE="VBSCRIPT" TYPE="TEXT/VBSCRIPT">
Function DetectObject(activeXname)
on error resume next
FoundStatus = False
FoundStatus = IsObject(CreateObject(activeXname))
If (err) then
FoundStatus = False
End If
DetectObject = FoundStatus
End Function
PluginStatus = DetectObject("ShockwaveFlash.ShockwaveFlash.5")
</SCRIPT>
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
alert("Flash 5 present: " + PluginStatus)
</SCRIPT>

Since you are using IE only, you can use vbscript. Essentially, you
try to create an object based on a string you've passed it... If it is
created, it means it exists, if not, it doesn't. The key is knowing
what string to use to test if the object is create-able. The one I
use here tests for Flash 5.

I don't know what you are looking for, but it may be necessary to find
a suitable string in the WIndows Registry. I have gone through the
registry hunting down obscure "signatures" before, and it has worked.

Hope this helps,

H.C.

P.T.Gowadia

unread,
Feb 6, 2002, 6:34:54 AM2/6/02
to
Thanks for the help.I got it spot on.The code that I tried was:-

<SCRIPT LANGUAGE="VBSCRIPT" TYPE="TEXT/VBSCRIPT">
Function DetectObject(activeXname)
on error resume next

FoundStatus = null


FoundStatus = IsObject(CreateObject(activeXname))
If (err) then
FoundStatus = False

else
FoundStatus = True


End If
DetectObject = FoundStatus
End Function

</SCRIPT>


<SCRIPT LANGUAGE="VBSCRIPT" TYPE="TEXT/VBSCRIPT">

PluginStatus = DetectObject("owc.spreadsheet")
</SCRIPT>

I looked up some references at msdn.microsoft.com and found out that
the revelant activeXname was "owc.spreadsheet".
Thanks a bunch.
P.T.Gowadia

comman...@hotmail.com (Holden Caulfield) wrote in message news:<6d0ce83a.02020...@posting.google.com>...

0 new messages