Name

getVar — Return the contents of a browser variable

Usage

WMLBrowser.getVar(name)

name : String

Description

Returns the contents of the browser variable with name name. If the variable isn’t set, returns an empty string.

Returns invalid if name can’t be converted to a string or doesn’t follow the rules for variable names given in Chapter 2.

Examples

WMLBrowser.getVar("foo")

returns contents of foo

WMLBrowser.getVar("foo")

returns string "" if variable foo isn’t set

WMLBrowser.getVar("123")

returns invalid

Get Learning WML, and WMLScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.