Google Groupes n'accepte plus les nouveaux posts ni abonnements Usenet. Les contenus de l'historique resteront visibles.

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

27 vues
Accéder directement au premier message non lu

P.T.Gowadia

non lue,
30 janv. 2002, 04:32:3230/01/2002
à
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

non lue,
3 févr. 2002, 13:39:3003/02/2002
à
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

non lue,
4 févr. 2002, 01:06:0904/02/2002
à
"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

non lue,
4 févr. 2002, 12:51:1404/02/2002
à
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

non lue,
6 févr. 2002, 06:34:5406/02/2002
à
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 nouveau message