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?", "", "")

Get Learning 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.