Hi there,
I try to create initial layout, based on a ajax - request.
So I call a ajax-post (window.dhx.ajax.post) an get a object back.
Later on I’ll loop the object to build the content.
for (var k in jsonResult[‘l’][‘d’])
{ var myLayout = new dhtmlXLayoutObject({
parent: jsonResult[‘l’][‘d’][k].parent,
pattern: jsonResult[‘l’][‘d’][k].pattern
});
}
It work s fine. But when I try to define/ build the cells like this:
for (var k in jsonResult[‘l’][‘d’])
{ var myLayout = new dhtmlXLayoutObject({
parent: jsonResult[‘l’][‘d’][k].parent,
pattern: jsonResult[‘l’][‘d’][k].pattern,
cells: jsonResult[‘l’][‘d’][k].cells
});
}
content of jsonResult[‘l’][‘d’][k].cells is:
[{ id: “tmpCell_0”, text: “tmpCell_0”, collapsed_text: “tmpCellCollapse_0” },
{ id: “tmpCell_1”, text: “tmpCell_1”, collapsed_text: “tmpCellCollapse_1” },
{ id: “tmpCell_2”, text: “tmpCell_2”, collapsed_text: “tmpCellCollapse_2” }]
I get this Error: TypeError: u is null Line 9 in dhtmlxSuite_v51_std/codebase/dhtmlx.js
Is it a bug in dhtmlx.js Or is something wrong with my code?
Thanks for your time!!