DHTMLX Docs & Samples Explorer

Confirm window


  • 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
		text: "Continue?",
		callback: function() {dhtmlx.confirm("Test confirm");}
//window-related initialization
		title: "Close",
		text: "Are you sure you want to do it?",
		callback: function() {dhtmlx.confirm("Test confirm");}

Short form