Hello dev, how can I access the button click event for the confirm box. (Message control)
Imagine the script below.
dhx.confirm({
text: 'Are you sure you want to delete this entry?",
buttons: ['No', 'Yes']
});
Can how I assign an event if the user selected the ‘YES’ button?.
On dhtmlxv5 they have api for this. If I remember it correctly it goes like below.
dhtmlx.confirm({
text: 'Are you sure you want to delete this entry?',
callback: function(e){
if(e)
{
// the user press the "Yes/Okay" button
setTimeout(function(){
// confirmation code here.. proceed deletion of entry.
// call some function here.
}, 50);
}
return true;
}
});
How can I do that on this version 6?
Should I assign a function or click event on dhx_alert__confirm-aply
via jquery/dom attach event?
Is there a way we can have an api similar to the v5? Much cleaner code.