DHTMLX Docs & Samples Explorer

Confirm window

Parameters

  • id - (string) the window id.
  • title - (string) the text of the header (by default, 'Confirm').
  • text - (string) the text of the window body.
  • type - the subtype of the window or a custom css class. The default value for the window - 'confirm'.
    Available values depend on the type of initialization:
    • 'common' - ('confirm', 'confirm-warning', 'confirm-error') defines a subtype of the window.
    • 'window-related' - ('confirm', 'confirm-warning', 'confirm-error' or string) defines a subtype or a custom css class.
  • callback - (function) the function called on button click. Takes 'true' or 'false' as the parameter (subject to the clicked button).
  • cancel - (string) the text of the 'Cancel' button.
  • ok - (string) the text of the 'Ok' button.

Full form

//common initialization
dhtmlx.message({
                type:"confirm",
		text: "Continue?",
		callback: function() {dhtmlx.confirm("Test confirm");}
});
//window-related initialization
dhtmlx.confirm({
		title: "Close",
                type:"confirm-warning",
		text: "Are you sure you want to do it?",
		callback: function() {dhtmlx.confirm("Test confirm");}
});

Short form

dhtmlx.confirm("ConfirmText");