How to Show Dialogs

// Show alert dialog
var alertStrings = { confirmButtonLabel: "Yes", text: "This is an alert.", title: "Sample title" };
var alertOptions = { height: 120, width: 260 }; 
Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then(
    function(success) {
        console.log("Alert dialog closed");
    },
    function(error) {
        console.log(error.message); 
    }
);

// Show confirm dialog
var confirmStrings = { text:"This is a confirmation.", title:"Confirmation Dialog" };
var confirmOptions = { height: 200, width: 450 }; 
Xrm.Navigation.openConfirmDialog(confirmStrings, confirmOptions).then(
    function(success) {
        if (success.confirmed)
            console.log("Dialog closed using OK button.");
        else
    }
);

Source: Xrm.Navigation (Client API reference)