Required library edition:
Required library file: dhtmlxtoolbar.js
attach an event handler to webbar
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);