DHTMLX Touch simplified creating alert, confirm and notice messages by means of 3 commands: dhx.alert(), dhx.confirm() and dhx.notice().
Please note, created alert(confirm) windows:
Let's know how to use them.
By calling this command you create alert window.
dhx.alert({ title: "Close", message: "You can't close this window!", callback: alert2 }) function alert2() { dhx.alert("You closed me") }
There is the other way to call this command.
dhx.alert("AlertText");
It's analogous to the following calling statement:
dhx.alert({ title: "Info", message: "AlertText", width: 300,// the default width value height: 200, // the default height value position: "center", // the default text alignment callback: "" })
By calling this command you create confirm window.
dhx.confirm({ title: "Close", message: "Are you sure you want to do it?", callback: function(result) { if (result) dhx.alert("You have select 'Ok'"); else dhx.alert({ message:"You have select 'Cancel'", callback:function(){ dhx.confirm("Still want to try?"); } }); } });
You also have the other way to call this command:
dhx.confirm("ConfirmText");
It's analogous to the following calling statement:
dhx.confirm({ title: "Info", message: "ConfirmText", width: 300,// the default width value height: 200, // the default height value position: "center", // the default text alignment callback: "" })
By calling this command you create notice window.
All the parameters are optional.
dhx.notice({ message: "Sorry, an error has occured!", css:"error", delay:2000 })
There is the other way to call this command.
dhx.notice("Trial version");
It's analogous to the following calling statement:
dhx.alert({ message: "Trial version", css:"", width: 160,// the default width value height: 60, // the default height value, delay:3500, // the default time delay top: 9, // the default top offset of the text right: 9 // the default right offset of the text })