Question about putting menus in a cell

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I think the problem is the way your menu is setup in the table. There are two methods for doing that

1. use buildAfterLoad=true; in the data file and put all the calls into the table cell

2. put the main menu only into the table cell and the calls for files the first thing after the body tag

In the first method you would have this at the top of your data 'file'

Code: Select all

_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-3
_buildAfterLoad=true;
In the second method you'd have this in your table cell

Code: Select all

 <SCRIPT>
with(milonic=new menuname("Main Menu")){
style=miniStyle;
alwaysvisible="1";
position="relative";
menuwidth="100%";
aI("text=Home;url=index.php;");
aI("text=News;url=index.php?news=yes;");
aI("text=NLT Parts Catalog;url=index.php?categoryID=100;");
aI("text=Special Sale Items;url=index.php?categoryID=200;");
aI("text=Portable Radios;url=index.php?categoryID=300;showmenu=Portable Radios;");
aI("text=Mobile Radios;url=index.php?categoryID=400;showmenu=Mobile Radios;");
aI("text=Stations;url=index.php?categoryID=500;showmenu=Stations;");
aI("text=Tech Specials;url=index.php?categoryID=600;");
aI("text=Service Aids;url=index.php?categoryID=700;showmenu=Service Aids;");
aI("text=Site Credits;url=index.php?show_aux_page=14;");
aI("text=M/A Com Parts;url=index.php?show_aux_page=10;");
aI("text=NLT Repair Depot;url=index.php?show_aux_page=11;");

}
drawMenus();
</script>
and all the rest would be the first thing after the body tag.

This allows the submenus to be built completely before anything else on the page.

http://milonic.com/tablemenu.php

Since you are seeing the Milonic item flicker in and then disappear I think you're right on the timing, especially since once the page is in cache that doesn't happen. Maybe setting up the menu in this way will fix that.

Ruth
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

Hi Ruth,

That's exactly the adivce I was going to give her, but I didn't know if it would work given that she's using PHP built menus. I figured I'd give no advice at all instead of giving bad advice...
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi Vikenk,

It's really nice to see you back :)

Well, I don't do php menus either, but since they seem to be on the page I just figured that she could set it up as noted. I know that Milonic uses php but they actually have the menu data file as a php file menu_data.php. Maybe she could set it up so that the main menu is last, though I'm not sure if that will work or not. I have seen some pages where they are on the page and the style, submenus, main menu is the setup.

Welcome back!

Ruth
street9009
Super Advanced
Super Advanced
Posts: 31
Joined: Sat Sep 16, 2006 1:16 am

Post by street9009 »

Thanks for the replies. (And just for the record, it's "him" or "he" :P)

The second method Ruth posted isn't an option as this is the PHP mysql based menu, which gets built from the database by calling a php function. It puts all of the menu code wherever you call that function by default.

So I tried method 1, and nothing changed.

Did I do something wrong?
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

Hi,

Sorry about the "she" reference :oops: I had read another post which was signed by a woman before I read yours. The name must have stuck in my head.

Did you put the _buildAfterLoad=true in the exact spot that Ruth told you to? Did you follow caplitalization rules? I think that makes a difference in this case.
street9009
Super Advanced
Super Advanced
Posts: 31
Joined: Sat Sep 16, 2006 1:16 am

Post by street9009 »

Code: Select all

<script>

_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-3;
_buildAfterLoad=true;
There's the exact paste of the top of the menu code that's generated by the PHP call.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I have posted requesting help on this. I don't know how position menus coming from a data base.

Ruth
street9009
Super Advanced
Super Advanced
Posts: 31
Joined: Sat Sep 16, 2006 1:16 am

Post by street9009 »

Thanks again, I do appreciate the help.
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

Yeah.....I'm sorry, but I'm stumped on this one. Although I know HTML pretty well, I know nothing about working with PHP.

Sorry I couldn't help more.
street9009
Super Advanced
Super Advanced
Posts: 31
Joined: Sat Sep 16, 2006 1:16 am

Post by street9009 »

No worries, you have helped a LOT as it is. I appreciate it.

I will wait to see what Ruth's post comes up with.

Thanks to you both again.
street9009
Super Advanced
Super Advanced
Posts: 31
Joined: Sat Sep 16, 2006 1:16 am

Post by street9009 »

Any news on this issue?
street9009
Super Advanced
Super Advanced
Posts: 31
Joined: Sat Sep 16, 2006 1:16 am

Post by street9009 »

Did you get any response to your inquiry, Ruth? I still can't manage to figure out this one.
Post Reply