Categories | Question details Back To List | ||
accessing event object using setOnClickHandler Hello, dhtmlxToolbar : v.1.0 build 80512 I have toolbar object with onestate and twostate buttons. I have defined an event handler using setOnClickHandler.This handler returns itemId which was clicked. How can I get the event object back for onclick event. I want to use this event object to find the current mouse location. Thanks. Answer posted by Support on Apr 28, 2009 14:04 There is no way to access native event object from custom event of toolbar. The only way to access such data - modify code of toolbar, so extra parameters would be sent to custom event handler. If necessary we can provide info about exact code location, which need to be modified. Answer posted on Apr 28, 2009 14:06 Thank you for immediate reply. Can you please provide exact location and code which needs to be modified. If needed I can send my license key. Thanks. Answer posted by Support on Apr 28, 2009 14:32 dhtmlxprotobar.js, line 419 if (that.action) { that.action(that.id); } can be replaced with if (that.action) { that.action(that.id,null,(e||event)); } dhtmlxtoolbar.js , line 813 if(that.action){that.action(that.id,that.state);} can be replaced wit h if(that.action){that.action(that.id,that.state,(e||event));} It will add native event object as 3rd parameter of onClick event handler |