MESSAGEBOX

Display a message box with configurable title, message, buttons and optional text input.

Description

MESSAGEBOX displays a message to the user. You can provide both the title and message of the alert box. Using the buttons parameter you can specify the button titles that are displayed in the message box.

Parameters

options Object (required) - The options for the message box

callback function (required) - invoked when the message box is dismissed

Examples

MESSAGEBOX({title: 'Confirm', message: 'You have selected a critical safety violation. Are you sure?', buttons: ['Yes', 'No']}, function (result) {
  if (result.value === 'Yes') {
    // Selected Yes
  } else {
    // Selected No
  }
});