WMLScript confirm() Function

The confirm() function displays a message, waits for an answer, and then returns a boolean value based on the user's selected answer. If the user selects ok, it returns true, and if the user selects cancel, it returns false.

Syntax

n = Dialogs.confirm(message, ok, cancel)
Component Description
n Boolean value returned by this function.
message String containing the message.
ok String containing the text "OK".
cancel String containing the text "cancel".

Example

var a = Dialogs.confirm("Exit?","Yes","No");

Result

a = true (if "Yes" is selected)
a = false (if "No" is selected)