Milonic DHTML/JavaScript Menu Sample Page

Editing the menu

- To edit the menu, open the file menu_data.js in a text editor and edit the details inside the aI() text strings
- To add more menu items, just create another aI() string on a new line and enter your properties
- add a showmenu=MENUNAME; property if you want this menu to open a sub menu
- To Add more menus, copy another menu and paste it inside your data file. A menu starts: with(milonic=new menuname("MENUNAME")){ and ends: }
- Any problems, visit http://www.milonic.com/forum. Beginners guide is at http://www.milonic.com/beginner.php
- To get the menu onto your website, insert the following HTML into each page using the menu:

      <script type="text/javascript" src="milonic_src.js"></script>
      <script type="text/javascript" src="mmenudom.js"></script>
      <noscript><a href=http://www.milonic.com/>JavaScript DHTML menu is only visible when JavaScript is enabled</a></noscript>
      <!-- The next file contains your menu data, links and menu structure etc -->
      <script type="text/javascript" src="menu_data.js"></script>

Links to other menu demos are:

- Dynamic Menu Building API
- Tooltips
- DHTML Menu based on HTML Lists
- Frames based menu for version 5.0
- Menu built using PHP - You'll need PHP for this
- Menu built using XML - You'll need PHP for this

Please note that users of Microsoft Windows XP with Service Pack 2 will need to unblock this page in order to see the menu. The reason for this is due to the fact that the menu has been written in JavaScript. This feature is considered unsafe when used locally and Service Pack 2 now blocks this by default for your safety. This only happens when you run the menu on a local machine, live use on the Internet will not be affected. Milonic Solutions Ltd assure you that there is absolutely no danger of allowing content from the DHTML Menu provided it has been downloaded from www.milonic.com
For instructions on removing the forced popup message, please visit http://www.milonic.com/removelink.php
For information on menu properties, please see http://www.milonic.com/menuproperties.php
For information on menu item properties, please see http://www.milonic.com/itemproperties.php
For information on style properties, please see http://www.milonic.com/styleproperties.php
Installation instructions - install.html
How to build menus - howtobuild.html
Read Me - readme.html
License Details - license.html

Opening Windows and Frames with the Menu
When opening new windows you can either press CTRL+N to open a new window or you can press SHIFT and click on the link either in the menu or on a standard link in your web page. You can also force this behaviour in any of the menu items in your menu by adding a target. An example of this can be seen here. aI("text=Open Google in New Window;url=http://www.google.com;target=_blank"); The above menu item sample will create a new instance of your browser and automatically navigate to the web site you have declared in your menu item text string. You can also replace the target with _new or the name of a frame. You can even take this step further and open a customized browser instance with control over the following browser properties height=300 - Windows Outer Width in Pixels width=300 - Window Outer Width in Pixels toolbar - "Back", "Forward" and other buttons location=yes - Show Current URL directories - Show What's new and other buttons status - Show the status bar menubar - Display the browser menu bar scrollbars - Use scrollbars if needed resizable - Include user re-sizing of Window copyhistory - Duplicate the GO history This feature is included within the menu and is controlled by the targetfeatures property in your menu item. If you wanted to open a new browser window for a specified link but limit the size to 300 pixels wide by 300 pixels high, you would declare a menuitem like this: aI("text=Open Google;url=http://www.google.com;target=windowname; targetfeatures=width=300,height=300"); The above menu item will open a new browser window to www.google.com. This window will contain no scroll bars, location bars, status bars, menus or the ability to resize the window. This is the blank state of a browser window. If you needed to add features to the above window you would do this by adding them to the targetfeatures property. For example, if you wanted the same size window for Google, as in the above sample, but you also wanted the ability to resize the window. Plus, you wanted the status bar to appear and you wanted to be able to scroll the window you can add these parameters to the targetfeatures property. The menu item would then look something like this: aI("text=Open Google;url=http://www.google.com;target=windowname; targetfeatures=width=300,height=300,status,scrollbars,resizable"); The above principle applies to all other window opening properties (from the list above) when opening windows using this technique. If you omit the targetfeatures property the standard browser will load as though you had selected it by clicking on an icon on your desktop. In order to open the menu in an IFRAME you will need a custom JavaScript function. This function is very easy to integrate but it must be used in conjunction with the menu because it uses built in menu functions to get a reference to the IFRAME . Please note that at this stage this will not work for Netscape 4.x - Netscape 4.x does not support IFRAMES but you can have similar IFRAME functionality by using Layers. We will create a sample for Netscape 4.x at a later date. Please let us know if you need a sample for Netscape 4.x now and we can send you at least a workaround. The function is called openIframe and it's parameters are IFrameID and URL function openIFrame(IFrameID, URL){ ifId=gmobj(IFrameID) ifId.location.href=URL // Opera Bug Fix. ifId.src=URL } You must have an IFrame embeded in your HTML for the above function to work. You must also give the IFrame an id that will be it's reference in order to change the URL. The menuitem for changing the URL of your IFrame will need to look something like this: aI("text=Open Google in IFrame;url=javascript:openIFrame('tempiframe','http://www.google.com'")

- Dynamic Downloads are possible for the Opening Windows and Frames _H_T_I_W_ the Menu demo
- The code for this menu sample will be generated on the fly and compiled into a .ZIP file format for downloading onto your own machine.

Click here to download this sample

Note that you need to logged in to download the menus and the download delivered will depend on your current license status.