O'Reilly logo

Learning WML, and WMLScript by Martin Frost

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required