loadAll Method

Current information about Live Connect is now available in the Windows Live Developer Center. The information in the following sections is provided for legacy purposes only.

Loads the items in a DataCollection.

Script:  http://js.live.net/4.1/loader.js
Feature:  Microsoft.Live.Services
Namespace:  Microsoft.Live.Services

instance.loadAll(dataType, callback);


Type: String

The type of DataType to load.

Type: DataLoadCompleted

An optional callback that is invoked after the data load has completed.


IDataContextloadAll(String, DataLoadCompleted)

The loadAll method differs from the load method in that it specifies to load all resources of the type dataType. The Windows Live endpoint returns a maximum of 100 resource items. Therefore, for large resource collections, you should follow a recursive coding pattern to load the resources. For an example of how to use this pattern to load contacts, see Working With Large Contact Collections (JavaScript Library).

The following code example demonstrates how to use the loadAll method to load a user's contact. A callback method to invoke after the load operation returns is not shown.

        dataContext.loadAll(Microsoft.Live.DataType.contacts, contactsLoaded);

Windows Live Messenger Connect

Supported in: 4.1

Internet Explorer 8.0, Internet Explorer 7.0, Internet Explorer 6.0, Firefox 3.6, Firefox 3.5, Firefox 3.0, Firefox 2.0, Firefox 1.5, Chrome 4.0, Chrome 3.0, Chrome 2.0, Chrome 1.0, Safari 4.0, Safari 3.0