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"> 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.