Layering menus

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
wwwolf2
Beginner
Beginner
Posts: 2
Joined: Fri Feb 27, 2004 12:07 pm
Location: Southern England
Contact:

Layering menus

Post by wwwolf2 »

I am using a fixed side menu at the top of the page and a following 'top' menu to get you back to it once you scroll down the page. Can I safely position the scrolling one in the same space as the side menu, so that it 'hides' behind it until I scroll down, and then emerges? I've tried it in recent Safari, Opera and IE for Mac and on IE 5.5 and Netscape 7.0 for windoze. Hides nicely on all of them. Is that reliable behaviour for older browsers / other platforms?

In case my description not obvious, here's my test page:

http://www.eurosif.org/_pub2004/ztemplate/index.shtml

Thanks!
Jon
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Probably won't know for sure without testing in older browsers, I can't really help there.

Take a look at Activities > EU Policy > Transparency

Something wrong there!

maz
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

OK, we have a few things here...

1. It's not necessary to break apart the _data file into separate items as you have; i.e., ...

Code: Select all

<script language=JavaScript src="/_comm2004/scripts-mock/menu_data_lhs_about.js" type=text/javascript></script>	
<script language=JavaScript src="/_comm2004/scripts-mock/drawmenus.js" type=text/javascript></script>
I took those items and put them back into the main _data file.

2. borderstyle="none";, etc. "none" is invalid, just leave these statements out altogether.

3. separatorsize="1";, etc. Leave out the " " for numeric parameters, as separatorsize=1;. Also,if you have an item defined as 0 (zero), that can be left out as well.

4. Here's the problem child...

Code: Select all

with(milonic=new menuname("EUPolicy")){
style=menuStyle;
itemwidth=130;
aI("text=Transparency;showmenu=EUPolicy;url=/Z/how/nlp/index.shtml;");
aI("text=Multi-Stakeholder<br>Forum on CSR;url=/Z/how/tlt/index.shtml;");
aI("text=Other;url=/Z/how/hypn/index.shtml;");
}
Note the name of this menu is EUPolicy, and the very first aI() statement is calling this same menu again. Death loop. I'm sure you meant to have something else in there for the ...Transparency;showmenu= item.

As for the older browsers, I can't answer that, either. However, it's a nice effect.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

It works in Netscape 4.79 [pc] The 'item' becomes the 30 pixels you have listed for itemwidth and is completely black in color.

Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Ruth wrote:It works in Netscape 4.79 [pc] The 'item' becomes the 30 pixels you have listed for itemwidth and is completely black in color.
Do you mean the little scrolling 'top' thing? If yes, then it's not working. It should say 'top' with an upward pointing arrow on top of 'top'.
John
wwwolf2
Beginner
Beginner
Posts: 2
Joined: Fri Feb 27, 2004 12:07 pm
Location: Southern England
Contact:

Thanks everybody - is this better?

Post by wwwolf2 »

I've taken out the unnecessary code (zeros and "none") and fixed the broken submenu -- over-hasty cutting and pasting! :oops:

I wonder if the black menu was NS4 misinterpreting my illegal "none" values -- does it say "top" now? I tried to test i myself, but NS4 seems to have vanished off my old windoze machine... no great loss I guess! :lol:

The separation of one of the menus into a different file is deliberate -- I'm going to have a set of those, and use conditional SSIs to determine which side menu to load according to which section of the site the user is in. Is there a better way of doing that?

Best, Jon
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Do you mean the little scrolling 'top' thing? If yes, then it's not working.
Yes, I did. I meant it was working in the sense that it followed you down the page. The none confused it though and made the bgcolor for the item black so you couldn't see it. It is now working.

Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Thanks everybody - is this better?

Post by John »

wwwolf2 wrote:I've taken out the unnecessary code (zeros and "none") and fixed the broken submenu -- over-hasty cutting and pasting! :oops:
Just looked again and all appears to be well.
wwwolf2 wrote:I wonder if the black menu was NS4 misinterpreting my illegal "none" values -- does it say "top" now? I tried to test i myself, but NS4 seems to have vanished off my old windoze machine... no great loss I guess! :lol:
I was able to see the arrow and 'top' under IE6 even with the 'none' values in there. It still displays properly now. Old browser probably the problem, and, as you say, no great loss.
wwwolf2 wrote:The separation of one of the menus into a different file is deliberate -- I'm going to have a set of those, and use conditional SSIs to determine which side menu to load according to which section of the site the user is in. Is there a better way of doing that?
OK, got it.

Sounds like a good plan to me.
John
Post Reply