Availability: |
| |||
JavaScript syntax: | IE | navigator.userProfile.doReadRequest(aCode) | ||
IE | navigator.userProfile.doReadRequest(aCode, aName) | |||
IE | navigator.userProfile.doReadRequest(aCode, aName, aDomain) | |||
IE | navigator.userProfile.doReadRequest(aCode, aName, aDomain, aPath) | |||
IE | navigator.userProfile.doReadRequest(aCode, aName, aDomain, aPath, anExpire) | |||
Argument list: | aCode | The use code selects an explanatory message | ||
aDomain | A server domain | |||
aName | A name denoting who is asking | |||
anExpire | An expiry date for the permissions | |||
aPath | A document path |
Having queued some requests to read user preferences, of course you would only request access to ones you genuinely needed. Then you should call this method. It presents the user with a dialog asking for permission to access the listed preference values. If the user decides to grant access, you will have access to the user preferences, but only to the ones you have requested.
There are a set of optional parameters for this method although the first argument is mandatory. These arguments are:
A usage code. This is a numeric value but it is translated into an explanatory text in the dialog presented to the user. This argument must be present.
The name argument is available so that you can say who you are, when you ask for the permission to access the user profile.
You can specify a server domain, so that the permission granted can be recorded for that domain, to save requests from that domain interrupting the user to ask for the same permission more than once. This lasts for the session or until the expiry date if it is set.
You can specify a document path within which permission granted will apply. This is much like the way that cookies are allowed to be returned only for documents within a path tree. This lasts for the session or until the expiry date if it is set.
The last optional argument is an expiry date up to which time the permissions will be cached and can be used again subject to the domain and path criteria being satisfied.
Here is a list of the usage codes for use with the first argument:
Code | Description |
---|---|
0 | System administrator request. |
1 | Research and development. |
2 | Complete current transaction. |
3 | Modify the site content. |
4 | Improve site content. |
5 | Notify about updates to the site. |
6 | Contacting for sales leads. |
7 | Linking to other information already collected. |
8 | Other unspecified purposes. |
9 | Disclosure to other parties for reasons of updating the site. |
10 | Disclosure to other parties for marketing purposes. |
11 | Disclosure to other parties for marketing purposes with your permission. |
12 | Disclosure to other parties for any other purposes. |
Prev | Home | Next |
userProfile.clearRequest() | Up | userProfile.getAttribute() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |