Combining sample menus

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
dilbert
Advanced
Advanced
Posts: 28
Joined: Mon Jun 23, 2008 2:42 am

Combining sample menus

Post by dilbert »

Hi,
I am trying to combine the Amazon style menu with a table based menu.
I am not have complete success.
The first menu item, Milonic in this case, open on click, but the background image doesn't change, and as soon as you mouse over another top menu item, it closes.

Can the Amazon Style be used in a talbe?

Here is a test link: http://www.bloodbanktalk.com/ctr/index.htm

I took this out of menu_data.js:

Code: Select all

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
menuwidth=400;
openstyle="tab";
orientation="horizontal";
screenposition="center";
style=menuStyle;
aI("align=center;keepalive=1;showmenu=Milonic;text=MILONIC;");
aI("align=center;keepalive=1;showmenu=Partners;text=PARTNERS;");
aI("align=center;keepalive=1;showmenu=Links;text=LINKS;");
aI("align=center;keepalive=1;showmenu=MyMilonic;text=MYMILONIC;");
aI("align=center;itemwidth=80;keepalive=1;text=SEARCH;");
}
And added this to the index.htm page:

Code: Select all

<table width="100%" cellspacing="0">
  <tr>
    	<td width="98">
			<script type="text/javascript">
				with(milonic=new menuname("Main Menu")){
				alwaysvisible=1;
				menuwidth=400;
				openstyle="tab";
				orientation="horizontal";
				screenposition="center";
				style=menuStyle;
				aI("align=center;keepalive=1;showmenu=Milonic;text=MILONIC;");
				aI("align=center;keepalive=1;showmenu=Partners;text=PARTNERS;");
				aI("align=center;keepalive=1;showmenu=Links;text=LINKS;");
				aI("align=center;keepalive=1;showmenu=MyMilonic;text=MYMILONIC;");
				aI("align=center;itemwidth=80;keepalive=1;text=SEARCH;");
				}
				drawMenus();
			</script>
		</td>
	</tr>
</table>
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Combining sample menus

Post by Ruth »

Hi,

Put the main menu back into the data file like this, note the position="relative";

Code: Select all

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
menuwidth=400;
openstyle="tab";
orientation="horizontal";
screenposition="center";
style=menuStyle;
position="relative";
Then call all the files in the table. I tried using buildAfterLoad=true; which is normally what you need when you do it that way, but it causes an error, so I left it out and it seems to work fine. I tested in IE6, FF1.5, 2.0.0018, 3, Opera 9.5, NN7.2 and 9, Safari 3 for pc and it seems to work fine.

Ruth
Post Reply