Export (0) Print
Expand All

compareVersions Method

This topic documents a feature of Binary Behaviors, which are obsolete as of Internet Explorer 10.

Obsolete. Compares two version numbers.

Syntax

iResult = clientCaps.compareVersions(sVersionNumber1, sVersionNumber2)

Parameters

sVersionNumber1 Required. A String that specifies the first of two version numbers to compare.
sVersionNumber2 Required. A String that specifies the second of two version numbers to compare.

Return Value

Returns one of the following values:

-1
sVersionNumber1 is less than sVersionNumber2
0
sVersionNumber1 is equal to sVersionNumber2
1
sVersionNumber1 is greater than sVersionNumber2

Remarks

 New for Windows Internet Explorer 9 Internet Explorer 9. Obsolete. Do not use.

Example

This example uses the compareVersions method to compare the version of the installed Microsoft virtual machine component with a specified version.


<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");
    if (0 == oClientCaps.compareVersions(sMSvmVersion, "5,0,18,1024"))
        window.alert ("Versions matched!");
</SCRIPT>
 :  
</BODY>

Applies To

clientCaps

See Also

Community Additions

ADD
Show:
© 2014 Microsoft