message

shows a non-modal info message box

string message(string|object content, [string type,number expire,id id] );
content
string|objectmandatory, the text to show or an object with the config of a message. This parameter may include an HTML string that allows rendering an icon in the message type
stringoptional, the type of a message box: "info", "success", "debug", or "error" expire
numberoptional, the expire interval for a message in milliseconds, 4000 by default, -1 for not hiding the message ididoptional, the id of a message box
stringthe ID of the message box

Example

// basic initialization
webix.message("Some message","info",-1,"message1");
 
// extended initialization
webix.message({
    text:"Form Data are Invalid",
    type:"error", 
    expire: 10000,
    id:"message1"
});

Related samples

Details

Hiding a message

Message boxes can be hidden using API:

var message = webix.message("Hi!");
webix.message.hide(message);
 
// or via the given message id
webix.message("Hi!","info",-1,"hi");
webix.message.hide("hi");

Global settings

webix.message also provides the following global settings that are applied to all message instances:

webix.message.expire = 2000; // messages expire in 2 seconds
// messages appear in the right bottom corner
webix.message.position = "bottom";

Related sample:  Message: Global Settings

The position setting takes the following values:

If you want to specify custom horizontal or vertical position use CSS.

See also
  • Articles
  • Back to top
    Join Our Forum
    We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.