Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ram Chander Singh on Feb 24, 2009 02:32
open dhtmlx forum
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

Answer posted by Support on Feb 24, 2009 03:31
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 ) 
Answer posted on Feb 25, 2009 04:42
Thanks,

I got answer, i included "dhxTabbar.setHrefMode("iframe");" and it's working..!!


Thanks a lot,

Regards,
Ram