Shows a confirmation dialog.
Namespace: MindFusion.Common.UI
File: WindowHost.js
JavaScript Copy Code |
---|
function showConfirmDialog ([title, [message, [callback]]]) |
String. The text to display as a dialog title.
String. The message to display as the dialog text.
function. The callback function to invoke when the dialog is closed.The dialog's modalResult will be passed as a parameter to the callback function.
The following code renders a confirm dialog and handles the result in a callback method:
JavaScript Copy Code |
---|
host.showConfirmDialog("Confirmation", "This is the value of the data field \n <" + sender.data + "> \n Press OK to keep the value, or Cancel to clear the input", confirmCallback.bind(sender), document.body.children[0], sender.theme); // This is the callback function of the confirm dialog. |