StorageGet Method (CLIENT)


PLB Web Only, 9.8A

 

The StorageGet method retrieves HTML5 localStorage objects', HTML5 sessionStorage objects, and browser cookie data. The method uses the following format:

 

[label]

{object}.StorageGet

[GIVING {return}] using [*Key=]{key}[:

 

 

[*Options=]{mask}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A CLIENT object.

return

Optional. A Character String Variable that receives the string data retrieved from the browser storage.

key

Required. A Character String Variable or literal that specifies the keyword name string.

mask
Optional. A decimal number or Numeric Variable that specifies a bit mask value to control the operations of this method.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The HTML5 storage objects can store PL/B Web program data at the browser using the StorageSet method. The data can then be retrieved at a later time or in another browser session using the StorageGet method. This method uses a keyword to fetch data from the browser storage. See the following links for more information on the HTML5 storage objects:

  2.  

    http://www.w3schools.com/html/html5_webstorage.asp

     

  3. The EOS flag is set TRUE if the return variable is too small to receive the browser storage data string result without being truncated.

  4. The ZERO and OVER flags are always set FALSE.

  5. The {mask} values are defined as follows:

  6.  

    Value

    Definition

    0

    The default action by this method occurs when the *OPTIONS parameter is set to zero or when this parameter is not used. The default method operation is to use the browser 'localStorage object'.

    1

    This bit value causes this method to perform the operation using the browser 'sessionStorage object'.

    2

    This bit value causes this method to perform the operation using a browser storage cookie.

 

 

See Also: CLIENT, Client Methods, Method Syntax



PL/B Language Reference SetUTF8Convert Method (CLIENT) StorageSet Method (CLIENT)