I creted simple DIV containing some text. When I try to use myLayout.attachFooter(‘id_of_my_div’) the whole layout stops loading and I receive the following error:
parent: document.body, // id/object, parent container where the layout will be located
pattern: "1C", // string, layout's pattern
skin: "dhx_terrace", // string, optional, "dhx_skyblue", "dhx_web", "dhx_terrace"
cells: [ // optional, cells configuration according to the pattern
// you can specify only the cells you want to configure
// all params are optional
{
id: "a", // id of the cell you want to configure
text: "", // header text
collapsed_text: "", // header text for a collapsed cell
header: false, // hide header on init
width: 100, // cell init width
height: 100, // cell init height
collapse: false // collapse on init
fix_size: [true,null] // fix cell's size, [width,height]
}
]
});
LAYOUT.attachHeader("header");
LAYOUT.attachFooter("footer");
please include attached file with fix for attachFooter.
we will include it into next update, if you have pro-license you can open ticket in a support system and get updated version earlier
I used the following(in app.js) based on your suggestion:
$(function () {
// jquery document ready
dhxLayout = new dhtmlXLayoutObject(document.body, "1C");
});
Looks like the DHTMLX layout was loading before the document load was complete.
Thank you for your help. As always DHTMLX has been a great framework and excellent support from you.
Yes, you are always need to use something like doOnLoad function (like in samples)
Or the same thing using jQuery, like you do
Layout’s parent is “layououtObj” (div on the document.body) or document.body itselt. It must be loaded BEFORE you load your components to come “parent” for them
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan