userProfileuserProfile*
*Contents  *Index  *Topic Contents
*Previous Topic: UL
*Next Topic: VAR

userProfile

Description

Provides methods that allow a script to request read access to a user's profile information, and to perform read actions. Note that the request is queued up before the reading or writing action is performed, which simplifies the user's experience because he or she is only prompted for profile release permissions once for a batch of requests.

Example

The following is an example of a script that can be run on the client to read various values from the profile information.

// queue up a request for read access to multiple profile attributes
navigator.userProfile.addReadRequest("vcard.displayname");
navigator.userProfile.addReadRequest("vcard.gender");

// request access to this information
navigator.userProfile.doReadRequest(usage-code, "Acme Corporation");

// now perform read operations to access the information
name = navigator.userProfile.getAttribute("vcard.displayname");
gender = navigator.userProfile.getAttribute("vcard.gender");

// the script can now use the 'name' and 'gender' variables
// to personalize content or to send information back to the server

// this is to support getting back to a clean slate by clearing the
// request queue.
navigator.userProfile.clearRequest();

Methods

addReadRequest, clearRequest, doReadRequest, getAttribute


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.