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

confirm — Request a yes/no response from the user

Usage

Dialogs.confirm(msg, yes, no)

msg : String

yes : String

no : String

Description

Displays the message msg and the two alternative selections yes and no, and prompts the user to select one of them. If either yes or no is the empty string, it’s replaced with some implementation-dependent default value (such as OK or Cancel).

Returns true if the user selects the yes string, returns false if the user selects the no string, and returns invalid if any of the arguments can’t be converted to a string.

Examples

Dialogs.confirm("Reboot Universe now?", "Yes", "No")
Dialogs.confirm("Really do it?", "OK", "Cancel")
Dialogs.confirm("Are you sure?", "", "")

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