DHTMLX Docs & Samples Explorer

onStateChange

onStateChange event can be applied to Two State Button item only. This event calls user-defined handlers (if there are any) and passes the following parameters:

  • id - id of the item;
  • state - new state of the item.
    toolbar.attachEvent("onStateChange", function(id, state){});