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

setVar — Set a browser variable

Usage

WMLBrowser.setVar(name, value)

name : String

value : String

Description

Attempts to set the browser variable named name to the value given by value. Returns true if successful, false otherwise.

Returns invalid if either argument can’t be converted to a string, or if name isn’t a valid variable name according to the rules in Chapter 2.

Examples

WMLBrowser.setVar("foo", "Hello!")

sets foo to "Hello!"

WMLBrowser.setVar("123", "foo")

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