I finally solved this by changing the '‘onClose’ function as follows:
function doUnLoad()
{
if(CloseWindow == true)
{
return true;
}
dhtmlx.confirm({
text: 'You have Pending transactions<br/>Press YES to exit or NO to stay',
cancel: 'NO',
ok: 'YES',
callback: function(btn){if(btn == true)
{
CloseWindow = true;
parent.winMenuOpts.window('winAddEditCshTrn').close();
}
}});
}
The CloseWindow variable is a Global variable which I set to ‘false’ in the onLoad function. Haviing a Global variable is the only thing that I’m not too keen on.
I’m still hoping that the DHTMLX team can suggest a better option.
1 Like
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan