OnClick event is not fired from dhtmlXToolbarObject


OnClick event is not fired from dhtmlXToolbarObject. Am I missing something here ? My Code is given below.






























Try use onStateChange event for two-state buttons :


toolbar.attachEvent(“onStateChange”, function(id,state){
alert(“Button “+id+” was clicked”);
});



Thanks