Categories | Question details Back To List | ||
[dhtmlxTabbar] get all tab Ids / get all tab labels Two functions I wrote today. These should be included in the dhtmlxtabbar.js in de \codebase folder. Have fun! /* returns all tab ids of the tabbar */ dhtmlXTabBar.prototype.getTabIds = function (){ var ti = new Array(); for (var i in this.tabsId) { ti[ti.length] = i; } return ti; } /* returns all tab labels of the tabbar */ dhtmlXTabBar.prototype.getTabLabels = function (){ var ti = this.getTabIds(); var tic = ti.length; var tl = new Array(); for (var i=0; i<tic; i++) { tl[i] = this.getLabel(ti[i]); } return tl; } Answer posted by Support on Jul 22, 2008 07:24 The next version of tabbar will have built in itterator tabbar.forEachTab(... but for now there are really no any built in methods to iterate trough tabs, so the custom methods above is the only way to accomplish related tasks. |