Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
HTML and CSS
DHTML Behaviors
Methods
 getComponentVersion Method
getComponentVersion Method

Retrieves the version of the specified component.

Syntax

sVersion = clientCaps.getComponentVersion(sID, sIDType)

Parameters

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

Return Value

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

Remarks

Only Windows 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 the Microsoft virtual machine is installed and, if it is, uses the getComponentVersion method to indicate the version of the component currently installed.

<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 Microsoft Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this method.

Applies To

clientCaps

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker