the following code is able to add a tab, if such code is not inside the tab content.
function add(pos) {
var id = (new Date()).valueOf();
tabbar.addTab(id, "new tab", "*");
tabbar.setTabActive(id);
}
<a href="javascript:add(-1);">new tab</a>
How can I add a new tab using a button sited inside the tab content???