addComponentRequest Method

Internet Development Index

Adds the specified component to the queue of components to be installed.

Syntax

clientCaps.addComponentRequest(sID, sIDType [, sMinVer])

Parameters

sID Required. String that specifies any of the component identifiers listed in the Installable 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.
sMinVer Optional. String that specifies the minimum version number of the component to install.

Return Value

No return value.

Remarks

Only Microsoft® Internet Explorer components are specified by this method. Components not supported by Internet Explorer are ignored.

The addComponentRequest method queues a download request for the specified component. Actual download of the component does not occur until a call is made to the doComponentRequest method.

Example

This example uses the addComponentRequest and doComponentRequest methods to install the Internet Explorer Data Binding component, if the component does not already exist in the user's system.

<HTML xmlns:IE>
<HEAD>
<STYLE>
@media all {
IE\:clientCaps {behavior:url(#default#clientCaps)}
}
</STYLE>
<SCRIPT>
function window.onload()
{
var bDBAvailable  = false;
var sDBVersion = '';
var sDBID = "{9381D8F2-0288-11D0-9501-00AA00B911A5}";
bDBAvailable = oClientCaps.isComponentInstalled(sDBID,"componentid");
// if data binding is unavailable, install it
if (!bDBAvailable)
{
oClientCaps.addComponentRequest(sDBID, "componentid");
bDBAvailable = oClientCaps.doComponentRequest();
}
:
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
:
<IE:clientCaps ID="oClientCaps" />
:
</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

ClientCaps, Using DHTML Behaviors, compareVersions, doComponentRequest, isComponentInstalled