sub-menu positioning

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
pbyrne
Advanced
Advanced
Posts: 12
Joined: Tue Oct 17, 2006 7:11 am

sub-menu positioning

Post by pbyrne »

Hello...

It has been some time since I worked with my Milonic menu, and I am rusty. I have a test page at:

http://www.dracoblu.com/testindex.html

My issues are twofold:
- In IE the sub-menus do not appear
- In Firefox the sub-menus appear but are some distance lower than the main menu items

Any assistance would be appreciated. Thanks.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

You need to put the menu in the div/table using the correct method. The newest method is to put _buildAfterLoad=true; in the data file up in the _subOffset properties area. Then you put the call for all the menu files in the div/table. If that causes problems then the old method seems to work fine.

Cut the main menu from the data file, put it in its own data file, place a drawMenus(); at the end of that file. You will now have two data files both of which have a drawMenus(); at the end


On the page, call the file you have now up with the other program files, and put the new main menu file where you have the file now.

Code: Select all

<SCRIPT language=javascript src="milonic_src.js" 
type=text/javascript></SCRIPT>

<SCRIPT language=javascript type=text/javascript> 
//<![CDATA[ 
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");     
  else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>"); 
//]]> 
</SCRIPT>
<SCRIPT language=javascript src="bonesingermenu_data.js" type=text/javascript></SCRIPT>
<DIV class="page_wrap clearfix">
<DIV class=header_text>
<H1>Bone Singer</H1></DIV>
<DIV class=topnav id=nav>
<SCRIPT language=javascript src="bonesingermain_data.js" type=text/javascript></SCRIPT>
</DIV>
Ruth
pbyrne
Advanced
Advanced
Posts: 12
Joined: Tue Oct 17, 2006 7:11 am

Post by pbyrne »

Thanks for your reply, Ruth.

I have placed the code as such, by following your suggestion of a second .js file that includes only the menu data portion. It is in the file called embed_main.js:

Code: Select all

<body>
<script language="javascript" src="milonic_src.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript"> 
//<![CDATA[ 
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");     
  else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>"); 
//]]> 
</script>
<script language="javascript" src="bonesingermenu_data.js" type="text/javascript"></script>
<div class="page_wrap clearfix">
  <div class="header_text"><h1>Bone Singer</h1></div>
  <div class="topnav" id="nav"><script language="javascript" src="embed_main.js" type="text/javascript"></script></div>
The sub-menus still appear detached in FF, and in IE they do not appear at all. I tried the _buildAfterLoad=true; approach but could not position the menu where I wanted it.

Any help would be appreciated.
Thanks, Pat
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Only the main menu plus a drawMenus(); at the end of it goes in the embed_main.js file, all the style and subs go in the other file called with the program files.

When the menu is in a table like this the submenus have to be built first.

Ruth
pbyrne
Advanced
Advanced
Posts: 12
Joined: Tue Oct 17, 2006 7:11 am

Post by pbyrne »

Thanks Ruth. I have it working now.

Enjoy a great day!
Post Reply