Check documentation for the latest version of dhtmlxSuite onBeforeStateChange DHTMLX Docs

onBeforeStateChange

fires before the moment when the state of a two-state button item is changed

boolean onBeforeStateChange(string|number id,boolean state);
idstring|numberid of an item
statebooleannew state of an item
booleantrue to allow state changing, false to forbid it

Example

myToolbar.attachEvent("onBeforeStateChange", function(id, state){
    // your code here
});

Back to top