DHTMLX Docs & Samples Explorer

Index
dhtmlxtoolbar
API Methods

### attachEvent(original, catcher, CallObj)

Required library edition:
Required library file: dhtmlxtoolbar.js

attach an event handler to webbar

- original - event original name;
- catcher - event handler;
- CallObj - object which will call event.

Several handlers can be attached to one and the same event, and all of them will be executed.

Note: the names of the events are case-insensitive.

        toolbar.attachEvent("onClick", function(itemId){});
        // or
        function doOnClick(itemId){
            // code here
        }
        toolbar.attachEvent("onClick", doOnClick);