Are menu calls from a static link possible?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
funkykeys
Advanced
Advanced
Posts: 10
Joined: Wed May 21, 2003 5:32 pm

Are menu calls from a static link possible?

Post by funkykeys »

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
Thanks,
Scott
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Are menu calls from a static link possible?

Post by John »

Submenus are called from within the aI statement as follows...

Code: Select all

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.
John
funkykeys
Advanced
Advanced
Posts: 10
Joined: Wed May 21, 2003 5:32 pm

Re: Are menu calls from a static link possible?

Post by funkykeys »

Hi John,

Here's a better example:

Code: Select all

<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?
Thanks,
Scott
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Are menu calls from a static link possible?

Post by Ruth »

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://milonic.com/menu_methods.php and here is a sample of that type of menu

http://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
funkykeys
Advanced
Advanced
Posts: 10
Joined: Wed May 21, 2003 5:32 pm

Re: Are menu calls from a static link possible?

Post by funkykeys »

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: Select all

<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
Thanks,
Scott
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Are menu calls from a static link possible?

Post by Ruth »

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: Select all

<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: Select all

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

Code: Select all

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: Select all

<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: Select all

("sub1","milmenu",10,-10); 
Hope this helps. http://milonic.com/menu_methods.php Go down the page to the POP FUNCTION explanation.

Ruth
funkykeys
Advanced
Advanced
Posts: 10
Joined: Wed May 21, 2003 5:32 pm

Re: Are menu calls from a static link possible?

Post by funkykeys »

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

Code: Select all

<a href=# onmouseover="popup('Sub1')" onmouseout=popdown()>Test</a>
Thanks again!
Scott
Thanks,
Scott
Post Reply