Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Koos on May 16, 2008 04:18
open dhtmlx forum
[tabbar] get number of tabs

I wrote a function which returns the number of tabs (which, to my little surprise, did not exist yet). Tested in FF2 & IE6.

Would it be a nice idea to include it in the next release?

/**
* @desc: returns the number of tabs in all rows
* @type: public
* @topic: 0
*/
dhtmlXTabBar.prototype.getNumberOfTabs = function (){
var rc = this.rowscount;
var tc = 0;

for(var i=0; i<rc; i++)
{
if (!isNaN(this.rows[i].tabCount))
{
tc += this.rows[i].tabCount;
}
}

return tc;
}
Answer posted by Support on May 16, 2008 04:22

Thanks for code donation.
We will add such method to the next version of dhtlmxtabbar