load Method

Ff749781.note(en-us,MSDN.10).gifNote:
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 specified data type by using the named options and callback handler.

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

instance.load(dataType, options, callback);

Parameters

dataType
Type: String

The type of DataType to load.

options
Type: Dictionary

A dictionary of options for server-side filtering.

callback
Type: DataLoadCompleted

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

Implements

IDataContextload(String, Dictionary, DataLoadCompleted)

The load method is different from the loadAll method in that it takes an options parameter that specifies server-side filtering criteria. The filtering criteria are used to limit the resources that are returned. For more information, see Server-Side Data Filtering (JavaScript Library).

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 the load method using server-side filtering. A callback method to invoke after the load operation returns is not shown.

    var options = { "$filter": "FirstName eq 'Joe'" };
    dataContext.load(Microsoft.Live.DataType.contacts, options, contactsPartialLoad);

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

Show: