I have a similar issue. I presently us the below code to confirm that a user wants to close a document in a tab before allowing it to close.
tabBar.attachEvent(“onTabClose”, function (id) {
var r = confirm("Are you sure you want to close " + tabBar.getActiveTab() + “?”);
return r;
});
I would like to achieve the same thing with dhtmlx.confirm, but the modality of the control causes it to continue past the dhtmlx.confirm. Is there a way to change the modality or how would you achieve this?
tabBar.attachEvent("onTabClose", function (id) {
var r = confirm("Are you sure you want to close " + tabBar.getActiveTab() + "?");
return false;
});
And depending on result call removeTab manually
Using confirm works perfectly fine, but dhtmlx.confirm does not. Execution continues beyond dhtmlx.confirm to the next line of code. It does not wait for the confirm to complete before continuing.
I would like an example of my code, but written using dhtml.confirm instead of confirm.