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

sub-menu positioning


Poster: pbyrne
Dated: Tuesday October 17 2006 - 7:22:25 BST

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.


Poster: Ruth
Dated: Tuesday October 17 2006 - 7:57:52 BST

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


Poster: pbyrne
Dated: Tuesday October 17 2006 - 16:48:24 BST

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


Poster: Ruth
Dated: Tuesday October 17 2006 - 18:32:35 BST

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


Poster: pbyrne
Dated: Tuesday October 17 2006 - 18:48:03 BST

Thanks Ruth. I have it working now.

Enjoy a great day!