enables dynamic loading of sublevels
url | string | server-side script |
icon | boolean | true/false, replaces element's arrow with loading image while loading |
myMenu.enableDynamicLoading("server.php", true);
Menu sends two params to server-side script (in POST data):
// top-level
<menu>
<item id="navigation" text="Navigation" complex="true"></item>
<item id="help" text="Help" complex="true"></item>
</menu>
// sublevel (for navigation)
<menu parentId="navigation">
<item id="nav_general" text="General" complex="true"></item>
<item id="nav_settings" text="Settings" complex="true"></item>
</menu>
// sublevel (for help)
<menu parentId="help">
<item id="help_about" text="About..." img="about.gif"></item>
<item id="help_help" text="Help" img="help.gif"></item>
<item id="help_bugrep" text="Bug Reporting" img="bugrep.gif"></item>
</menu>
// top-level
[
{id: "navigation", text: "Navigation", complex: true},
{id: "help", text: "Help", complex: true}
]
// sublevel (for navigation)
{
parentId: "navigation",
items: [
{id: "nav_general", text: "General", complex: true},
{id: "nav_settings", text: "Settings", complex: true}
]
}
// sublevel (for help)
{
parentId: "help",
items: [
{id: "help_about", text: "About...", img: "about.gif"},
{id: "help_help", text: "Help", img: "help.gif"},
{id: "help_bugrep", text: "Bug Reporting", img: "bugrep.gif"}
]
}
Back to top