Hi Alexandra,
Find below the piece of code that calls the DHTMLX components and causes the error:
dhtmlxEvent(window,“load”,function(){
dhxWins = new dhtmlXWindows();
dhxWins.setImagePath("stylesheets/imgs/");
//var dhxLayout = new dhtmlXLayoutObject("Headers", "2E");
dhxLayout = new dhtmlXLayoutObject(dhxWins.createWindow({id:"wl", center:true, width:200, height:200}), "2E");
dhxWins.window("wl").setText("Label Refs Status");
dhxLayout.setEffect("resize", true);
dhxLayout.cells("b").attachObject(document.getElementById("details"));
dhxLayout.cells("a").dhxcont.mainCont.style.overflow="auto";
dhxLayout.cells("b").dhxcont.mainCont.style.overflow="auto";
dhxLayout.cells("a").hideHeader();
dhxLayout.cells("b").hideHeader();
var toolbar = dhxLayout.cells("a").attachToolbar();
toolbar.setIconsPath("stylesheets/imgs/");
toolbar.addButton("add", 0, "Add New Row", "plus1.gif", "plus1.gif");
toolbar.addButton("remove", 1, "Remove Row", "minus1.gif", "imgs/minus1.gif");
toolbar.attachEvent("onClick", function(id) {
switch(id)
{
case "add":
grid_header.addRow("nil", ["New"]);
break;
case "remove":
grid_header.deleteRow(grid_header.getSelectedRowId())
break;
}
});
toolbar_T = dhxLayout.cells("b").attachToolbar();
toolbar_T.setIconsPath("stylesheets/imgs/");
toolbar_T.addButton("add", 0, "Add New Row", "plus1.gif", "plus1.gif");
toolbar_T.addButton("remove", 1, "Remove Row", "minus1.gif", "imgs/minus1.gif");
toolbar_T.attachEvent("onClick", function(id) {
switch(id)
{
case "add":
grid_detail.addRow("nil", ["New"]);
break;
case "remove":
grid_detail.deleteRow(grid_detail.getSelectedRowId())
break;
}
});
var grid_header = dhxLayout.cells("a").attachGrid();
grid_header.setImagePath("stylesheets/imgs/");
grid_header.attachHeader("#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter");
grid_header.setSkin("dhx_skyblue");
grid_header.enableMultiselect(true);
grid_header.setColSorting("str,str,str,str,str,str,str,str,date,str,int,int,str,int,int,str");
grid_header.attachEvent("onRowSelect", doOnRowSelected);
grid_header.customGroupFormat = function(text, count) {
return "Grouped by " + text + ", there are " + count + " related records";
};
grid_header.loadXML("/headers/xml");
grid_header.enableSmartRendering(true);
DataProcessor_LabelRef = new dataProcessor("/headers/update");
DataProcessor_LabelRef.init(grid_header);
//Set Window maximized on header div
dhxWins.window("wl").setDimension(parseInt(document.getElementById('header').offsetWidth,10), parseInt(document.getElementById('header').offsetHeight,10));
dhxWins.window("wl").center();
dhxLayout.cells("a").setHeight(parseInt(document.getElementById('primaryContent').offsetHeight/3,10));
document.getElementById('primaryContent').style.height = dhxWins.window("wl").getDimension()[1] +'px';
dhxWins.window("wl").setMaxDimension(document.getElementById('primaryContent').offsetWidth, 10000);
dhxWins.window("wl").setMinDimension(document.getElementById('primaryContent').offsetWidth, 0);
dhxWins.attachEvent("onResizeFinish", function(wl){
var w_d = dhxWins.window("wl").getDimension();
document.getElementById('primaryContent').style.height = w_d[1] +'px';
});
});
Thanks and Regards
JuanMa