<- Back to CNS Menu function list
CNSMenu_DefineMenu
- Description
This is the main menu definition function. This function takes your XML menu definitions, parses them, and sets up menus to be displayed. For a complete understanding of this function, please see Appendix B. This function does not require that you use the root <CNSMenu> and </CNSMenu> tags unless you are using an internal DTD for entity definitions. If you do not use one of the root tags, you cannot use the other. In other words, both the opening <CNSMenu> and closing </CNSMenu> tags must be there, or both of the tags must not be there. You cannot have just the opening or just the closing tag.
- Return Type
- Text
- Format
- CNSMenu_DefineMenu ( XML )
- Required Parameters
- XML
The XML that Defines your Menu(s).
- XML
- Related Items
- CNSMenu_DefineMenuFile, CNSMenu_DefineQuickMenu
- Example
Code:
CNSMenu_DefineMenu("<menu name='test' script='menu click'><menuitem name='a menu item'/></menu>")Result:
Creates a menu named "test" that calls the "menu click" script when an item is chosen.