Dialogs Library

The Dialogs library contains functions used to create user dialogs.

alert

Description: Allows you to send message text to the user's device. Once the user confirms receipt of the message, an empty string is returned.

Syntax: Dialogs.alert(message)

Example: The following code expects a string input. It checks the length of the string, and if it is fewer than 8 characters, the message "Login must be longer than 8 chars" is displayed on the device screen:

// Check login length
if(String.length(login) > 8 ){
    // Too short, ask again
    Dialogs.alert("Login must be longer than 8 chars"):
}

confirm

Description: Allows you to send a message to the user's device. The user is given two selection options, ok or cancel (the text for each is ...

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.