Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:20

Are menu calls from a static link possible?


Poster: funkykeys
Dated: Monday April 21 2008 - 18:40:38 BST

Hi,

What's the syntax for calling a submenu group from a static parent link, rather than one that's generated by JavaScript?

Thanks!
Scott

Re: Are menu calls from a static link possible?


Poster: John
Dated: Monday April 21 2008 - 22:33:54 BST

Submenus are called from within the aI statement as follows...
Code:
aI("text=whatever;showmenu=menuName;... etc.

You would then set up the code for the sub called, in this case, menuName.

If this is not what you're after, I don't understand the question.

Re: Are menu calls from a static link possible?


Poster: funkykeys
Dated: Monday April 21 2008 - 22:54:01 BST

Hi John,

Here's a better example:

Code:
<A href="#" onMouseOver="[function call to milonic menu]">My static link</A>


I don't want to write the parent links like the one above using JavaScript. This is actually to be used to make a JavaScript call from Flash, which is natively supported in Flash 8. Does that make sense?

Re: Are menu calls from a static link possible?


Poster: Ruth
Dated: Tuesday April 22 2008 - 20:19:53 BST

Are you saying you don't want to use a link like the one you posted? That's the only way I know how to call a menu from a static link. Try this page and look down at the popup function http://www.milonic.com/menu_methods.php and here is a sample of that type of menu

http://www.milonic.com/menusample24.php

That sample actually places the menu based on an image, but as you can see from the methods and functions page you can place it just using 1 which will put it where the mouse x y coordinates are.

I hope this is what you mean, otherwise, I'm with John and don't know what it is you are asking.

Ruth

Re: Are menu calls from a static link possible?


Poster: funkykeys
Dated: Thursday April 24 2008 - 4:33:52 BST

Hi Ruth,

Thanks -- the list of methods helped get an understanding of what's possible, though my example below doesn't call up one of my menus named "Sub1":

Code:
<A href="#" onMouseOver="menuDisplay(gmobj('Sub1'),1)" onMouseOut="menuDisplay(gmobj('Sub1'),0)">My menu link</A>


I'm displaying it on a page that has loaded all of the JS code and menu item data, so I'm not sure what could be the problem. Any thoughts?

Thanks,
Scott

Re: Are menu calls from a static link possible?


Poster: Ruth
Dated: Thursday April 24 2008 - 5:27:39 BST

Uh, I have no idea what that is you posted. There is one called popup that is on that page. It doesn't have anything like gmobj in it.
Code:
<a href=# onmouseover="popup(sub1',1)" onmouseout=popdown()>


You can position the menu by mouse coordinates, either using just the menu name or using 1. I think probably you should use the 1 for it. Not sure if it will work in all browsers without the 1.

You could position it based on top and left in the menu itself which would be top and left relative to the page top and left. The call would be without the second parameter and below the code example is how the menu would be coded

Code:
<a href=# onmouseover="popup(sub1')" onmouseout=popdown()>


Code:
with(milonic=new menuname("Milonic")){
style=menuStyle;
top=262;
left=166;


You can position it based on an image which you have given a name and id so the call would have the menu name followed by the image name

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


You can position it based on an image as above but add parameters for fine tuning it from that image's bottom left position. So let's say you wanted it to open at the bottom left of your image, but wanted to shift it a bit farther down and more to the left, you'd add
Code:
("sub1","milmenu",10,-10);


Hope this helps. http://www.milonic.com/menu_methods.php Go down the page to the POP FUNCTION explanation.

Ruth

Re: Are menu calls from a static link possible?


Poster: funkykeys
Dated: Thursday April 24 2008 - 7:45:15 BST

I just used the example in one of the links you sent, but this worked perfectly:

Code:
<a href=# onmouseover="popup('Sub1')" onmouseout=popdown()>Test</a>


Thanks again!
Scott