menu items

How do nest menu items within a menu item like you have on your live demo where file opens to syntax and syntax opens to more menu items?

Which live demo do you mean ? Please provide the direct link

Hello! Here’s the link. I’m initializing the menu items via script. … ndex.shtml

So if I have the menu loading like so how can I add more menu items with the “Open” menu item?

menu.addNewSibling(null, “file”, “File”, false);
menu.addNewChild(“file”, 0, “new”, “New”, false, “new.gif”);
menu.addNewChild(“file”, 2, “open”, “Open”, false, “open.gif”);
menu.addNewChild(“file”, 3, “save”, “Save”, false, “save.gif”);
menu.addNewChild(“file”, 4, “saveAs”, “Save As…”, true, null, “save_as_dis.gif”);
menu.addNewChild(“file”, 6, “print”, “Print”, false, “print.gif”);
menu.addNewChild(“file”, 7, “pageSetup”, “Page Setup”, true, null, “page_setup_dis.gif”);
menu.addNewChild(“file”, 8, “close”, “Close”, false, “close.gif”);

You can use addNewChild method:

menu.addNewChild(“file”, 2, “open”, “Open”, false, “open.gif”);
menu.addNewChild(“open”, 0, “open_1”, “Open: child1”, false);

You are the best :slight_smile: