getComponentVersion Method

DHTML, HTML, & CSS

getComponentVersion Method


Retrieves the version of the specified component.

Syntax

sVersion = oClientCaps.getComponentVersion(sID, sIDType)

Parameters

sIDRequired. String that specifies any of the component identifiers listed in the Detectable Components in Internet Explorer document.
sIDType Required. String that specifies the case-insensitive type of the identifier specified in sID, or the following value:
componentidActive Setup identifier of the component.

Return Value

String. Returns the version number of the component, if it is installed, or null otherwise.

Remarks

Only Microsoft® Internet Explorer components are detected by this method. If a component identifier of a third-party component is specified, the method returns null.

Example

This example detects whether Microsoft virtual machine is installed and, if it is, uses the getComponentVersion method to indicate the version of the component currently installed.

Sample Code

<HTML xmlns:IE>
<HEAD>
<STYLE>
@media all {
      IE\:clientCaps {behavior:url(#default#clientcaps)}
}
</STYLE>
</HEAD>

<BODY>
<IE:clientCaps ID="oClientCaps" />

<SCRIPT>
    sMSvmVersion = oClientCaps.getComponentVersion("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}",
    "ComponentID"); 
</SCRIPT>   

 :
</BODY>
This feature requires Internet Explorer 5 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
clientCaps

See Also

client capabilitiesInternet Link, using dhtml behaviorsInternet Link, compareVersions, isComponentInstalled


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.