dhtmlxTabbar setContent

Hi ,



I have added a dhtmlxTabbar in layout and inside tab onClick on tab i want to call someOther URL , as it is given below:



var workspaceLayout = new dhtmlXLayoutObject(document.body, “2E”);

var medicationCell = workspaceLayout.cells(“a”)

var drugInteractionCell = workspaceLayout.cells(“b”)



medicationCell.hideHeader();

drugInteractionCell.hideHeader();

var medicationGrid = medicationCell.attachGrid();

medicationCell.setHeight(127);

var dhxTabbar=workspaceLayout.cells(“b”).attachTabbar();

dhxTabbar.setImagePath("/javascripts/dhtmlx/dhtmlxTabbar/codebase/imgs/");

dhxTabbar.addTab(“a1”,“History”,“100px”);

dhxTabbar.addTab(“a2”,“Interaction”,“100px”);

// dhxTabbar.setTabActive(“a1”);

// dhxTabbar.setOnSelectHandler(test);

dhxTabbar.setContent(“a1”,“list.html”);





I am getting error as “this._content[id] is null”, can you please let me know what mistake iam doing.





Regards,

Ram



Such situation can occur in two case
a) you are using incorrect tab ID as part of command
b) you have setTabActive executed before content assigned to the tab ( just change order of commands so setTabActive will be called after setContent )

Thanks,

I got answer, i included “dhxTabbar.setHrefMode(“iframe”);” and it’s working…!!


Thanks a lot,

Regards,
Ram