attachObject using full screen

I can not find any details on attaching objects when using full screen layout. I can get the menu and toolbar attached, but the toolbar wants to be on the menu bar. The menu initializes fine. The toolbar does not.

MainLayout=new dhtmlXLayoutObject(document.body,“3L”);
MainMenu=MainLayout.attachMenu();

var menuData = 
{
	parent: "parentId",
	icon_path: "../Common/imgs/menu/",
	onClick: "onClickHandler",
	items: 
	[
		{id: "mm_file", text: "File", items:[
			{id: "mm_new", text: "New", img: "new.png"},
			{id: "sep0", type: "separator"},
			{id: "mm_open", text: "Open", img: "open.png"},
			{id: "mm_save", text: "Save", img: "save.png"},
			{id: "mm_saveAs", text: "Save As...", disabled: true, img_disabled: "save_as_dis.png"},
			{id: "sep1", type: "separator"},
			{id: "mm_print", text: "Print", img: "print.png"},
			{id: "mm_pageSetup", text: "Page Setup", disabled: true, img_disabled: "page_setup_dis.png"},
			{id: "sep2", type: "separator"},
			{id: "mm_exit", text: "Exit", img: "exit.png"}
		]},
		{id: "mm_edit", text: "Edit", items:[
			{id: "mm_edit_undo", text: "Undo", img: "undo.png"},
			{id: "mm_edit_redo", text: "Redo", img: "redo.png"},
			{id: "sep3", type: "separator"},
			{id: "mm_edit_select_all", text: "Select All", img: "select_all.png"},
			{id: "sep4", type: "separator"},
			{id: "mm_edit_cut", text: "Cut", img: "cut.png"},
			{id: "mm_edit_copy", text: "Copy",img: "copy.png"},
			{id: "mm_edit_paste", text: "Paste", img: "paste.png"}
		]},
		{id: "mm_help", text: "Help", items:[
			{id: "mm_about", text: "About...", img: "about.png"},
			{id: "mm_help2", text: "Help", img: "help.png"},
			{id: "mm_bugrep", text: "Bug Reporting", img: "bug_reporting.png"}
		]}
	]
};

MainMenu = new dhtmlXMenuObject(menuData);

MainToolbar=MainLayout.attachToolbar();

var toolbarData = 
{
	parent: "parentId",
	icon_path: "../Common/imgs/toolbar/",
	onClick: "onClickHandler",
	items: 
	[
		{type: "buttonSelect", id: "new", text: "New", img: "new.gif", img_disabled: "new_dis.gif", options:[
			{id: "new_text", type: "obj", text: "Text Document", img: "text_document.gif"},
			{id: "new_excel", type: "obj", text: "Stylesheet", img: "stylesheet.gif"},
			{id: "new_db", type: "obj", text: "Database", img: "database.gif"},
			{id: "new_pp", type: "obj", text: "Presentation", img: "presentation.gif"},
			{id: "new_s1", type: "sep" },
			{id: "new_other", type: "obj", text: "Other", img: "other.gif"}
		]},
		{type: "separator", id: "sep1"},
		{type: "button", id: "open", img: "open.gif"},
		{type: "buttonTwoState", id: "autosave", text: "Autosave", img: "save.gif", pressed: true, tooltip: "Autosave every 5 minutes"},
		{type: "button", id: "save_as", text: "Save As...", disabled: true, img: "save_as.gif", img_disabled: "save_as_dis.gif"},
		{type: "separator", id: "sep2"},
		{type: "buttonInput", id: "inp", text: "Input", width: 50},
		{type: "slider", id: "sld", length: 70, value_min: 10, value_max: 100, value_now: 70, text_min: "10 MBit", text_max: "100 MBit", tip_template: "Limit connection speed to %v MBit"},
		{type: "separator", id: "sep3"},
		{type: "button", id: "cut", img: "cut.gif"},
		{type: "button", id: "copy", img: "copy.gif"},
		{type: "buttonTwoState", id: "paste", img: "paste.gif"},
		{type: "separator", id: "sep4"},
		{type: "buttonSelect", id: "print", text: "Print", img: "print.gif", img_disabled: "print_dis.gif", options:[
			{id: "print_page", type: "obj", text: "Page", img: "page.gif"},
			{id: "print_range", type: "obj", text: "Page Range", img: 'page_range.gif'},
			{id: "print_sel", type: "obj", text: "Selection", img: 'selection.gif'},
			{id: "print_sep1", type: "sep"},
			{id: "print_cfg", type: "obj", text: "Settings", img: 'settings.gif'}
		]},
		{type: "separator", id: "sep5"},
		{type: "text", id: "info", text: "dhtmlxToolbar Demo"}
	]
};

MainToolbar = new dhtmlXMenuObject(toolbarData);

parentId

is not needed/used when using full screen layout. So what would the parent tag be set to?

You use the same container (with id “parentId”) for both menu and toolbar. This is the reason for the problem.

Also there is no need to call MainMenu=MainLayout.attachMenu(); and MainToolbar=MainLayout.attachToolbar(); as menu and toolbar are initialized by:

MainMenu = new dhtmlXMenuObject(menuData);
MainToolbar = new dhtmlXMenuObject(toolbarData);

If I don’t use: MainMenu=MainLayout.attachMenu();

and there is no:

because I am using full screen, then how will the menu and toolbar get attached “outside” the layout? I don’t want them in a cell. As you can see in the screen shot, I am using the demo for the email program you have on the site to test with.

var menuData =
{
parent: “parentId”, <----- document.body ???
icon_path: “…/Common/imgs/menu/”,

I figured it out…