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:40

Inactive submenu with position=relative in table


Poster: dferracci
Dated: Thursday June 30 2005 - 19:51:32 BST

Hi all,

This will all make more sense if you can see the site.

http://nyccfbtest.info/debates_vg/voter ... mayor.aspx

Username and Password are both cfbtest

So you're on the Mayor page, which is a submenu item of Candidates. When you click on
All About Voting, its submenu appears but is completely inactive. This only occurs in IE and
only when
I give the "Voting" menu the position="relative"; attribute.

Without the relative position attribute the menu works, but it begins just below the
All About Voting parent
and runs off the page. I want it all the way flush left.

A minor issue is that with the relative attribute the top border of the Voting submenu is
double-thick. Any ideas?

The contents of my embedded_main_menu_vg.js file:

Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
position="relative";
orientation="horizontal";
menuwidth=642;
itemwidth=107;

aI("showmenu=Candidates;image=/includes/scrollmenu/2005vg_primary/
icon_candidates.gif;overimage=/includes/scrollmenu/2005vg_primary/
icon_candidates_over.gif;imagepadding=2;imagealign=center;imageposition=top;
text=Meet the<br> Candidates;align=center;padding=2;url=;");
aI("image=/includes/scrollmenu/2005vg_primary/icon_maps.gif;
overimage=/includes/scrollmenu/2005vg_primary/icon_maps_over.gif;
imagepadding=2;imagealign=center;imageposition=top;text=District<br> Maps;
align=center;padding=2;
url=/debates_vg/voter_guides/
primary_2005/nav_maps.aspx;");
aI("showmenu=Voting;image=/includes/scrollmenu/2005vg_primary/
icon_q-a.gif;overimage=/includes/scrollmenu/2005vg_primary/icon_q-a_over.gif;
imagepadding=2;imagealign=center;imageposition=top;text=All About<br> Voting;align=center;padding=2;url=;");
aI("image=/includes/scrollmenu/2005vg_primary/icon_debates.gif;
overimage=/includes/scrollmenu/2005vg_primary/
icon_debates_over.gif;imagepadding=2;imagealign=center;
imageposition=top;text=Debate Program;align=center;padding=2;
url=/debates_vg/voter_guides/
primary_2005/nav_debates.aspx;");
aI("image=/includes/scrollmenu/2005vg_primary/icon_machine.gif;
overimage=/includes/scrollmenu/2005vg_primary/icon_machine_over.gif;
imagepadding=2;imagealign=center;imageposition=top;text=2005 Primary;align=center;padding=2;url=/debates_vg/voter_guides/
primary_2005/nav_primary.aspx;");
aI("image=/includes/scrollmenu/2005vg_primary/icon_program.gif;
imagepadding=2;imagealign=center;imageposition=top;
overimage=/includes/scrollmenu/2005vg_primary/icon_program_over.gif;
text=NYC's Campaign Finance Program;align=center;padding=2;
url=/debates_vg/voter_guides/
primary_2005/nav_program.aspx;");
}

<!---------------------------------------------------->

with(milonic=new menuname("Candidates")){
style=submenuStyle;
orientation="horizontal";
menuwidth=647;
menuheight=30;
itemwidth=130;
itemheight=30;
keepalive=true;
aI("text=mayor;align=center;url=/debates_vg/voter_guides/primary_2005/
intro_mayor.aspx;pagematch=/debates_vg/voter_guides/primary_2005/
cd_statement/m_");
aI("text=public advocate;align=center;url=/debates_vg/voter_guides/primary_2005/
intro_pa.aspx;pagematch=/debates_vg/voter_guides/primary_2005/
cd_statement/pa_");
aI("text=comptroller;align=center;url=/debates_vg/voter_guides/
primary_2005/intro_comptroller.aspx;pagematch=/debates_vg/
voter_guides/primary_2005/cd_statement/comp_");
aI("text=borough president;align=center;url=/debates_vg/voter_guides/primary_2005/
intro_bp.aspx;pagematch=/debates_vg/voter_guides/primary_2005/
cd_statement/bp");
aI("text=city council;align=center;url=/debates_vg/voter_guides/primary_2005/
intro_citycouncil.aspx;pagematch=/debates_vg/voter_guides/
primary_2005/cd_statement/cd;");
}

<!-------------------------------------------------------->

with(milonic=new menuname("Voting")){
style=submenuStyle;
orientation="horizontal";
//pagebgcolor="#BCC6D6";
//pagecolor="#FFFFFF";
menuwidth=647;
menuheight=30;
itemwidth=130;
itemheight=30;
keepalive=true;
position="relative";
aI("text=your rights as a voter;align=center;url=/debates_vg/voter_guides/primary_2005/
voting_rights.aspx;pagematch=voting_rights.aspx");
aI("text=using the voting machine;align=center;url=/debates_vg/voter_guides/primary_2005/
voting_machine.aspx;pagematch=voting_machine.aspx");
aI("text=voting q & a;align=center;url=/debates_vg/voter_guides/primary_2005/
voting_q-a.aspx;pagematch=voting_q-a.aspx");
aI("text=write-in voting;align=center;url=/debates_vg/voter_guides/primary_2005/
voting_write-in.aspx;pagematch=voting_write-in.aspx");
aI("text=other resources;align=center;url=/debates_vg/voter_guides/primary_2005/
voting_resources.aspx;pagematch=voting_resources.aspx");
}
drawMenus();


Poster: Ruth
Dated: Thursday June 30 2005 - 21:35:41 BST

Hi,

The only menu that should be set as relative is the main menu. I know you have asp so that may require something else as to where the submenus are, but they are supposed to be in a separate file from the main menu. Usually what is done for a table is to leave the submenus in the menu_data.js file and put the main menu in the file you are going to embed. To put the menu in a table and have it work correctly all the submenus are supposed to be built before the main menu is called, that's why the calls for the menu files, including the menu_data.js file is set to be right after the body tag before any other html objects are built on the page.

As to centering the submenu, unfortunately I tried setting screenposition="center"; just for the heck of it but that didn't work. So, to get it to 'center' below the full main menu, you'll have to experiment on pixels needed and then set left="offset=-42"; [it's about -42 for that voting one]. That will have the menu open offset from it's usual opening position. I think there may be a way to make a function to have it set it's position based on something else, but I don't know functions. You might take a look at the methods and functions page. There is also a global variables page.

Hope that helps.

Ruth