diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E8E82EBC-05E6-49A2-9451-BF02986BCEE8.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E8E82EBC-05E6-49A2-9451-BF02986BCEE8.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,33 @@ + + +preferenceForKey()

preferenceForKey()

+

Description:

+

The preferenceForKey method allows a previously stored preference to be restored.

+

Syntax:

+
[string] window.widget.preferenceForKey(String key) 
+

or

+
[string] widget.preferenceForKey(String key)
+

Arguments:

+
    +
  • key:

    + +

    A text string specifying the name that represents the preference to be restored.

    + +
  • +
+

Return value:

+

A text string contains the preference value associated with the specified key.

+

If the key does not exist, the return value is "undefined".

+

Example code:

+
// Check for the existence of searchKey
+if(widget.preferenceForKey('searchKey'))
+{
+ // get the searchKey from the preference
+ var searchArg = widget.preferenceForKey('searchKey');
+ // set the search argument to the search field
+ document.forms[0].searchKey.value = searchArg;
+}
+
\ No newline at end of file