I have some text able to add a tab:
<a href="javascript:add(-1)">add tab</a>
and the specific function:
function add(pos) {
var id = (new Date()).valueOf();
tabbar.addTab(id, "new text", "*");
}
How can I automatically make the added tab Active???
Thanks
tabbar.addTab(id, “new text”, “*”);
tabbar.setTabActive(id);
Perfect…It works very well.
Just another question: how can I define the content of a tab, added through that code?
You may one of the methods to define the content:
setContent
setContentHTML
the sample is dhtmlxTabbar/samples/01_initialization/01_init_from_script.html
setContentHref
samples are dhtmlxTabbar/samples/01_initialization/05_loading_by_ajax.html and dhtmlxTabbar/samples/01_initialization/06_loading_by_iframes.html