Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Wednesday July 18 2012 - 06:07:34
You are here concept.
Poster: vishmehra
Dated: Thursday June 20 2002 - 15:14:06 BST
We are trying to build a "You are here concept". Here is how we are looking at building the structure:
For e.g. if my menu is something like this:
1
2
3
4
5
6
7
8
9
10
11
12
When I show the menu, I need to show it only one level deep at anytime. Thus on the home page the navigation would be:
1
2
3 (Pop-up)
7 (Pop-up)
8 (Pop-up)
9 (Pop-up)
12 (Pop-up)
Now when some one clicks 2, here is what happens:
1
2 (Place down arrow here)
3
4 (Pop-up)
5 (Pop-up)
6 (Pop-up)
7
8
9
10 (Pop-up)
11 (Pop-up)
12 (Pop-up)
The thing that we are having to do is to dynamically calculate the position of the "Down arrow" on the menu item that has been expanded. The main issue is that the "Down arrow" has to align with the other ">" arrows in the menu. Any suggestions?
Thanks,
Vishal.
Poster: Andy
Dated: Thursday June 20 2002 - 16:22:43 BST
Hi,
I've just created a small function to return a reference to the image so
that you can change it's src.
function getSubImage(mnu,item)
{
menunum=getMenuByName(mnu)
for(a=1;a<imar.length;a++)
{
tim=imar[a].split("_");
if(tim[3]=="menu"+menunum && tim[2]==item)
{
return gmobj(imar[a]);
}
}
}
getSubImage("mainmenu",4).src="blackarrowdn.gif"
The above needs to go after the menu references. You then need to give the
menu item a dummy sub menu to fool it into thinking that it needs to place
an image inside it like this
,"<b>Software</b><img src=blackarrowdn.gif
border=0>","show-menu=dummy","software.htm
offfontcolor=003366;offbackcolor=ffffff;onfontcolor=003366;onbackcolor=fffff
f","",1
Let me know if you need any help getting it to work.
Cheers
Andy.