WMLScript confirm() Function
The confirm() function displays a message, waits for a response, and then returns a boolean value based on the user's chosen response. If the user selects ok, it returns true; if the user selects cancel, it returns false.
Syntax
n = Dialogs.confirm(message, ok, cancel)
Component | Description |
---|---|
n | The boolean value returned from this function. |
message | String containing the message. |
ok | String containing the word "OK". |
cancel | String containing the word "cancel". |
Example
var a = Dialogs.confirm("Exit?","Yes","No");
Result
a = true (if "Yes" is selected) a = false (if "No" is selected)