I need to programatically set attributes of each tab

dhtmlx.com/docs/products/kb/inde … amp;q=3049

in reference to the above question, the setTabActive syntax is correct.  This is a text substitution trick with the back end programs/database access routines.  I pass the value of the tab Id from the database.

Second, I got the setOnSelectHandler() to work in that the handler is firing.  Now I need to programatically set attributes of each tab.  What is the syntax to get the current tab?  I am getting the tab clicked passed to the handler but before I move, I need to submit the form that is embedded in the current tab and change the tab header.

I tried  test=document.getElementById(‘a_tabbar’);
but I am getting setLabel is not a function errors.

a) you need not use getElementById to access tabbar. Tabbar object and container div which was used for tabbar initialization are different entities
b) You can get current active tab as

    var id=a_tabbar.getActiveTab();

But how can I refer to a tab when it is not active? I have multiple tabs, each communicating with the database using Ajax (every 5 seconds a request is made). Based on data in database, I want to change the caption of the tab. E.g. I use the tabbar for multiple chat windows. These windows check for new messages in the database. When a new message arrives in one of the windows, the corresponding tab caption should change to: ‘new message’.

But how can I refer to a tab when it is not active?
Basically you need to set tab to active state, the getActiveTab used only to get tab’s ID; in real app you will probably know the IDs of all tabs.
And of course you can use setLabel against not active tab.