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:

dhxTree.attachEvent(“onClick”,function(id){
if (id!=1){
if(!dhxTabbar.cells(id)){
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.setImagePath("/codebase/imgs/");
        mygrid.setSkin("dhx_skyblue");

// mygrid.setDateFormat("%d/%m/%Y");
mygrid.init();
mygrid.loadXML(“users_xml.php”);
mygrid.attachHeader(" , ,#combo_filter, , ,#combo_filter");

      };
    dhxTabbar.setTabActive(id);
    };   
        return true;
    });

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

Alexandra,

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] this.style.visibility=“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
dhtmlxtabbar.zip (11.2 KB)

Alexandra,

It Works!
Thank you very much!