Click to return to the DHTML, HTML     
XMLDocument Property     addDABehavior method     Default Behaviors Referen...    
Web Workshop  |  DHTML, HTML & CSS

addComponentRequest Method


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

Syntax

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

Parameters

sIDRequired. 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.

Sample Code

<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 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:
clientCaps

See Also

ClientCaps, Using DHTML Behaviors, compareVersions, doComponentRequest, isComponentInstalled



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.