Sorry but I just do not understand how to use confirm with if.
dhtmlx.message({
type:"confirm",
text: "Continue?",
callback: function(mode)
var test = mode; //mode==true if OK button was pressed, false otherwise
alert(test); //why no alert with true oder false popup?
}
});
[code]dhtmlx.confirm(“ok?”,function(result){
if (result) ok();
else cancel();
});
function ok() {
alert (“ok”);
}
function cancel() {
alert (“cancel”);
}
[/code]
But how can I use this version?
dhtmlx.confirm({
title: "Close",
type:"confirm-warning",
text: "Are you sure you want to do it?",
callback: function() {dhtmlx.confirm("Test confirm");}
});