A pseudo tab in tabbar?

Hi, I created a tab which basically acts as “add new tab” button. I attached a function to onSelect event which checks if this “add” tab is clicked. If so, it creates a new tab, and sets the new tab active. The code is like following –

tabbar.attachEvent(“onSelect”, function(id) {
if (id == “addTab”) {
tabbar.addTab(“test”, “Test”, “100 px”, 0);
tabbar.setContentHref(“test”, “http://www.google.com”);
return true;

Problem: even though I set active tab to “test”, the active tab will be either the pseudo “addTab” tab or the original active tab depending on if the function returns true or false. Is there a way to implement this? Thanks a lot!

Probably next will work

tabbar.attachEvent("onSelect", function(id) { if (id == "addTab") { tabbar.addTab("test", "Test", "100 px", 0); tabbar.setContentHref("test", "http://www.google.com"); window.setTimeout(function(){ tabbar.setTabActive("test"); },1); return false; } return true; });

Thanks! Is there a way for me to add a button to the tabbar?

Technically it possible to inject some custom html element in the tabbar’s row, but they will be ignored by other content - for example if you will have too many tabs - they may be rendered over such content.

If you still interested I may provide some code snippets.

Yes, please!

Check the attached sample
1282561495.zip (64.9 KB)