DHTML Menu Studio FAQ
Question ID:
Q3049Question:
How can I dynamically create the menu structure using a server-side scripting language?- itemText -- text of the item (can be HTML code).
- itemUrl -- URL the item links to (can be empty). This can also be a JavaScript function call (in such case use the javascript: prefix).
- targetFrame -- target frame for the specified URL (can be empty). To open item in a new window, enter _blank.
- itemIcon -- url of the icon to be displayed next to the item (can be empty)
- nMenu -- identifies the menu bar being created. If creating a single menu bar, enter m1. For the second menu, enter m2 etc. If using PHP, you can leave this parameter empty, when creating a single menu.
- itemText -- text of the item (can be HTML code).
- itemUrl -- URL the item links to (can be empty). This can also be a JavaScript function call (in such case use the javascript: prefix).
- targetFrame -- target frame for the specified URL (can be empty). To open item in a new window, enter _blank.
- parentMenu -- identifier of the parent menu into which the popup will be inserted. This is the identifier being returned by the SSAddTopLevelMenu, SSAddSubMenu, or SSGetTopLevelMenu functions.
- itemIcon -- url of the icon to be displayed next to the item (can be empty)
- nMenu -- identifies the menu bar being created. If creating a single menu bar, enter m1. For the second menu, enter m2 etc. If using PHP, you can leave this parameter empty, when creating a single menu.
- itemText -- text of the item (can be HTML code).
- itemUrl -- URL the item links to (can be empty). This can also be a JavaScript function call (in such case use the javascript: prefix).
- targetFrame -- target frame for the specified URL (can be empty). To open item in a new window, enter _blank.
- parentMenu -- identifier of the parent menu into which the item will be inserted. When inserting into the top-level menu bar, enter null. When inserting into a popup, this is the identifier being returned by the SSAddTopLevelMenu or SSAddSubMenu functions.
- itemIcon -- url of the icon to be displayed next to the item (can be empty)
- nMenu -- identifies the menu bar being created. If creating a single menu bar, enter m1. For the second menu, enter m2 etc. If using PHP, you can leave this parameter empty, when creating a single menu.
- nSubMenu -- index of the top-level menu item being returned. For the first pop-up menu, enter 1, for the second enter 2 etc.
- nMenu -- identifies the menu bar being created. If creating a single menu bar, enter m1. For the second menu, enter m2 etc. If using PHP, you can leave this parameter empty, when creating a single menu.
... // -------------------------- // Add items to the menu here // -------------------------- // adding top-level items $e_1=SSAddTopLevelMenu("Sample folder 1","", ""); $e_2=SSAddTopLevelMenu("Sample folder 2","http://www.xtreeme.com/", ""); // adding first popup items (and a sub-popup) SSAddMenuItem ("Item","http://www.google.com/", "",$e_1); $e_1_1=SSAddSubMenu("Subfolder","http://www.yahoo.com/", "",$e_1); SSAddMenuItem ("Item opened in a new window","http://www.msn.com/", "_blank",$e_1_1); // adding item to second popup SSAddMenuItem ("Item","http://www.pixel-peeper.com/", "",$e_2); ...
... // -------------------------- // Add items to the menu here // -------------------------- // getting IDs of top-level items $e_1=SSGetTopLevelMenu(1); $e_2=SSGetTopLevelMenu(2); // adding first popup items (and a sub-popup) SSAddMenuItem ("Item","http://www.google.com/", "",$e_1); $e_1_1=SSAddSubMenu("Subfolder","http://www.yahoo.com/", "",$e_1); SSAddMenuItem ("Item opened in a new window","http://www.msn.com/", "_blank",$e_1_1); // adding item to second popup SSAddMenuItem ("Item","http://www.pixel-peeper.com/", "",$e_2); ...
Sample folder 1 Item Subfolder Item opened in a new window Sample folder 2 Item