WMLBrowser Library

The WMLBrowser library contains functions used to manipulate the WML browser. All these functions will return invalid if no WML browser is present or if the WMLScript interpreter is not invoked by the WML browser.

getCurrentCard

Description: Result is the shortest relative URL of the current WML card.

Syntax: WMLBrowser.getCurrentCard()

Example: The following code returns the card that is currently at the top of the history stack:

// Get current card
function browserCard(){
    var curCard = WMLBrowser.getCurrentCard();
}

getVar

Description: Accesses the value of the variable specified by name in the browser.

Syntax: WMLBrowser.getVar(name)

Example: The following code gets the value of the variable "zip" out of the WML variable ...

Get WAP Development with 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.