Skip to main content

Message properties

Message box

The constructor of a message box may take the following parameters:

text(string) required, the text of a message box
icon(string) optional, an an icon from the used icon font
css(string) optional, the style of a message box
html(string) optional, the HTML content to be displayed in a message box

Related Sample: Message. Message with HTML content
node(HTMLELement | string) optional, the container for a message box or its id
position(string) optional, the position of a message box: "top-left" | "top-right" | "bottom-left" | "bottom-right"

Related Sample: Message. Message positioning and container
expire(number) optional, the time period of displaying a message box before it disappears, in ms
dhx.message({
text:"Message text",
icon:"dxi-clock",
css:"expire",
expire:1000
});

Alert box

The constructor of an alert box may take the following parameters:

text(string) required, the text of an alert box
header(string) optional, the text of an alert box header
css(string) optional, the style of an alert box
buttons(array) optional, an array with the name of the alert button. By default, the button's name is "Apply"
buttonsAlignment(string) optional, the position of buttons: "left" | "center" | "right"
blockerCss(string) optional, the style of blocking the window when an alert box appears
htmlEnable(boolean) optional, enables/disables the HTML content to be displayed in an alert box; true by default

Related Sample: Message. Disable HTML content
dhx.alert({
header:"Alert Header",
text:"Alert text",
buttonsAlignment:"center",
htmlEnable: false
});

Confirm box

The constructor of a confirm box may take the following parameters:

text(string) required, the text of a confirm box
header(string) optional, the text of a confirm box header
css(string) optional, the style of a confirm box
buttons(array) optional, an array with the names of the confirm buttons. By default, the buttons' names are "Reject" and "Apply"
buttonsAlignment(string) optional, the position of the button: "left", "center", or "right" (by default)
blockerCss(string) optional, the style of blocking the window when a confirm box appears
htmlEnable(boolean) optional, enables/disables the HTML content to be displayed in a confirm box; true by default

Related Sample: Message. Disable HTML content
dhx.confirm({
header:"Confirm Header",
text:"Confirm text",
buttons:["cancel", "apply"],
buttonsAlignment:"center",
htmlEnable: false
});

Tooltip

The constructor of a tooltip may take the following parameters:

node(HTMLELement | string) required, the target of tooltip or its id
position(string) optional, the position of a tooltip: "right", "bottom", "center"
css(string) optional, the style of a tooltip box
force(boolean) optional, forces opening of a tooltip
showDelay(number) optional, the time period that should pass before showing a tooltip, in ms
hideDelay(number) optional, the time period that should pass before hiding a tooltip, in ms
htmlEnable(boolean) optional, enables/disables the HTML content to be displayed in a tooltip; true by default
dhx.tooltip("Tooltip From Right", {
node: "fourth",
position: "right",
htmlEnable: false
});