2.6 -> Problem with Tabbar

Hi,

i just installed the new version and have problems with adding new Tabs.
Content isn’t loaded and tab looks inactive.

Code and Screenshots are provided below:

var dhxtabbar = dhxLayout.cells(“c”).attachTabbar();
dhxtabbar.enableAutoReSize(true,true);
dhxtabbar.setHrefMode(“iframes”);
dhxtabbar.setSkinColors(“#FCFBFC”,“#F4F3EE”);
dhxtabbar.setImagePath(“<%= dhtmlxPath %>/imgs/”);
dhxtabbar.enableTabCloseButton(true);
dhxtabbar.attachEvent(“onTabClose”,function(tabId){
closeTab(tabId);
return true;
});

dhxtabbar.attachEvent(“onSelect”, function(tabId){
if (dhxtabbar.tabWindow(tabId).document.title != undefined && dhxtabbar.tabWindow(tabId).document.title != “”) {
var statustext = dhxtabbar.tabWindow(tabId).document.title;
window.status=statustext;
}
return true
});

var menu1 = new dhtmlXMenuObject();
menu1.setIconsPath(“<%= dhtmlxPath %>/imgs/”);
menu1.renderAsContextMenu();
dhxtabbar._tabZone.id=“theader”;
menu1.addContextZone(“theader”);
menu1.loadXML(“dhxmenu.xml”);
menu1.attachEvent(“onClick”, function(id, zoneId) {
if (id == “closeAll”) {
for(var tabid in dhxtabbar._tabs) {
closeTab(tabid);
}
}
});

function addTab (myUrl, tabtext) {
if (info) {
log.info(“addTab”);
}
if (myUrl > “”) {
var tabid = “tab” + counter++;
AnzahlTabs = AnzahlTabs + 1;
dhxtabbar.addTab(tabid,tabtext,“*”);
dhxtabbar.setContentHref(tabid,myUrl);
dhxtabbar.setTabActive(tabid);
}
}




Hi,

yes, there can be such a problem if dhtmlxcontainer.js is included.
I’ve attached the modified dhtmlxcontainer.js that provides getFrame() method. It is applied to a cell object and returns an iframe object.

Therefore, please try using:

var statustext = dhxtabbar.cells(tabId).getFrame().contentWindow.document.title;

instead of

var statustext = dhxtabbar.tabWindow(tabId).document.title;

Method will be included into the next official build.
dhtmlxcontainer.zip (7.4 KB)