Milonic Home Page Information and Benefits of Milonic Products Some Samples of DHTML and JavaScript Products Download DHTML Menu Purchase Milonic JavaScript DHTML Products Tech Support Contact Milonic
Member Login - Search: Sitemap
Current Menu Version: 5.955 dated Sunday April 14 2024 Click to Download
Using The Popup Menu Function Positioned by Images

Milonic Partners Links My Milonic

Using The Popup Menu Function Positioned by Images
The sample demonstrates how to set a sub menus position based on the relative location of an image or other HTML object using the popup function.

The above menu uses a series of href text links that have an image included in the page's HTML next to them, this image is then used to determine the precise location of where the menu should appear. The popup function then uses the left position of the image for the left position of the menu, and the top position of the image plus the image height for the top position of the menu.

The code we use for this is standard HTML and is as follows:

<img src="/images/transparent.gif" border="1" name="milonicmenu" id="milonicmenu">
<a href=# onmouseover="popup('milonic','milonicmenu')" onmouseout="popdown()"><font size="3" color="green">Milonic</font></a>

The image in this sample has its border set to 1, this shows you where the 1 pixel transparent image is. This would normally be invisible. Also, the following image: Has been positioned inside text that will move based on browser position. if you change the size of your browser, the text will wrap and move the image in relation to this but the menu will always appear based on the location of the image, try it and see. Also, see this image:

Note that offsets can be applied to top and left properties to fine tune the position of submenus opened with the popup("menuname",imageid) command.

Don't forget that there are no limits to the number of submenus a menu can contain, you will of course only be restricted by the physical screen space.
  • Dynamic Downloads are possible for the Agriculture 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.

Purchase The Menu

Download DHTML Menu

See our list of Menu users

Milonic provide full featured pull down web menus for some of the worlds largest companies

Learn about how Milonic's DHTML menus can benefit your site

What does it cost? DHTML Menu prices

Who is using us?
Sample Client list

Bespoke menu design and build service from the Milonic team

Our bolt-on modules provide free optional extras for specialist projects

Free icons and images for all licensed users with our Menu Imagepack

What is Milonic up to at the moment? Check our blog