dhxLayout

I created a layout as follows:





var skin = “dhx_blue”;

var dhxLayout= new dhtmlXLayoutObject(“parentId”, “1C”,skin);

var menu = dhxLayout.cells(“a”).attachMenu();

menu.setImagePath("/gbmims/js/dhtmlxMenu/codebase/imgs/");

dhxMenu.setIconsPath("/gbmims/js/dhtmlxMenu/samples/images/");

dhxMenu.addNewSibling(null, “reports”, “Reports”, false);

dhxMenu.addNewChild(“reports”, 6,“report1”, “STG 4 - IAB”, false, “new.gif”);

dhxMenu.addNewChild(“reports”, 7,“report2”, “Mid Market Dashboard”, false, “new.gif”);

dhxMenu.addNewSibling(“reports”, “export”, “Export”, false);

dhxMenu.addNewChild(“export”, 0, “export1”, “Export New Net Opps LW”, false, “new.gif”);

dhxMenu.addNewChild(“export”, 1, “export2”, “Export New Net Opps QTD”, false, “new.gif”);

dhxMenu.addNewChild(“export”, 2, “export3”, “Export Top 35”, false, “new.gif”);

dhxMenu.addNewSibling(“export”, “print”, “Print Preview”, false);

dhxMenu.addNewChild(“print”, 3, “print1”, “Preview New Net Opps LW”, false, “print.gif”);

dhxMenu.addNewChild(“print”, 4, “print2”, “Preview New Net Opps QTD”, false, “print.gif”);

dhxMenu.addNewChild(“print”, 5, “print3”, “Preview Top 35”, false, “print.gif”);



I get an error as menu is not null when it tries to set the image path ammediately after attachMenu()



Any clues?



This is the only basic code I have in my application for testing.



Script is ok, have you attach all necessary js/css files?

To be sure that problem is not in some missed file - you can try to include single dhtmlx.js included in Suite 2.0 instead of separate js files for each component.