Check documentation for the latest version 6.0 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){ ... };

Parameters

idstring|numberid of an item
statebooleannew state of an item

Returns

booleantrue to allow state changing, false to forbid it

Example

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

Back to top