Check documentation for the latest version of dhtmlxSuite onSelect DHTMLX Docs


fires when a tab is selected

boolean onSelect(string|number id,string|number lastId);
idstring|numberclicked tab id
lastIdstring|numberid of the previously active tab, if any
booleantrue|false to allow/cancel selection


var myTabbar = new dhtmlXTabBar("parentId");
myTabbar.attachEvent("onSelect", function(id, lastId){
    // your code here
    return true;


Fires only for enabled tabs, return true|false to allow/cancel selecting

Back to top