Tabbar new tab error when creating same tab after close.

When I creating 1 tab and then close it and creating this tab again I’m getting following:

win.attachGrid is not a function
[Break on this error] var mygrid = win.attachGrid();
10.249…44:2010 (line 89)
this.cells(id).show is not a function
[Break on this error] _setTabActive:function(tab,mode){if (…);this._scrollTo(tab);return true;},

Code that I’m using to add tab:

if (id!=1){
dhxTabbar.addTab(id, dhxTree.getUserData(id,“title”));
// dhxTabbar.setContentHref(id, dhxTree.getUserData(id,“href”) );
var win = dhxTabbar.cells(id);
// var toolbar = win.attachToolbar();
// toolbar.setIconsPath("/codebase/imgs/");
// toolbar.loadXML(“dhxtoolbar.xml”);

    var mygrid = win.attachGrid();

// mygrid.setDateFormat("%d/%m/%Y");
mygrid.attachHeader(" , ,#combo_filter, , ,#combo_filter");

        return true;

The code looks correct. I’ve attached the working demo. (81.9 KB)


Thank you for your reply. Sample is working in IE8 and my code as well. But it failing in Mozilla Firefox 3.6.8 which is current available version.

Error raising when pushing on x (close tab):

this.adjustContent is not a function
[Break on this error]“hidden”;this.s…lse,0);};return this._content[id];},

my code is failing on:
win.attachGrid is not a function
Line 89

right after var win = dhxTabbar.cells(id); this could be probably true than code snippet above.

Could you please help in fixing current problem for Mozilla Firefox, Opera, Chrome and Safari.

we have recreated the problem locally. Please try to use attached file instead of the original dhtmlxtabbar.js (11.2 KB)


It Works!
Thank you very much!