/
notification.confirm( )

notification.confirm( )

notification.confirm()

navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels])

Shows a customisable confirmation dialog box.

Parameters #

  • message: Dialog message (String)
  • alertCallback: Callback to invoke with index of button pressed (1, 2 or 3). (Number)
  • title: Dialog title (String) (Optional, Default: "Confirm")
  • buttonName: Comma separated string with button labels (String) (Optional, Default: "OK,Cancel")

Supported Platforms #

  • Android
  • BlackBerry WebWorks (OS 5.0 and higher)
  • iOS (OS 4.0 and higher) 

Examples #

function onConfirm(button) {
    alert('You selected button ' + button);
}
// Show a custom confirmation dialog
//
function showConfirm() {
    navigator.notification.confirm(
        'You are the winner!',  // message
        onConfirm,              // callback to invoke with index of button pressed
        'Game Over',            // title
        'Restart,Exit'          // buttonLabels
    );
}



Related content

Installing Client CLI
Installing Client CLI
More like this
Hybrid Blink App Shells (Cordova)
Hybrid Blink App Shells (Cordova)
More like this
Client CLI Authentication
Client CLI Authentication
More like this
Creating Interactions
Creating Interactions
More like this
iOS: Create Signing Certificates
iOS: Create Signing Certificates
More like this