We have created an html page with a number of tab(We are not using dhtmlx tab). On click of a tab we want different content to be loaded in a div below. On click of one of the tab we want to load an html page using the following piece of code. The initLayout() function will initialize a dhtmlx layout in a div on the page being loaded using the tabURL. We are getting an error on line 12 of the dhtmlxLayout.js. Would like to know if there is something wrong with our approach and if there is any other way to achieve the same. We do not want to put all content on one page.
function onTabSelect(selTab){
dhtmlxAjax.get(tabURL, function(loader){
document.getElementById(“content”).innerHTML=loader.xmlDoc.responseText;
alert(loader.xmlDoc.responseText); /This alert works fine/
if(selTab==“dataContainer”){
initLayout();
}
});
}
function initLayout(){
//Layout
dhxLayout = new dhtmlXLayoutObject(“refDataLayout”, “2U”);
alert(“hello 2”);/This alert does not appear/
dhxLayout.cells(“a”).setText(“Reference Data”);
dhxLayout.cells(“a”).setWidth(210);
dhxLayout.cells(“b”).setText(“Test”);
dhxLayout.setSkin(‘dhx_skyblue’);
dhxLayout.setImagePath(“dhtmlx/dhtmlxLayout/codebase/imgs/”);
statusBar = dhxLayout.attachStatusBar();
statusBar.setText(“Done”);
}
Please help.