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

Collapsible Menu, embeded in table but submenu does not open


Poster: TheStealth
Dated: Monday February 19 2007 - 1:29:43 GMT

I'm really starting to get the hang of this, but seem to have hit a problem. If you look at my example and try to click on "News", it does not open :?: :?: :?: . Any ideas why? I know its not the menu item itself because I removed all of the reference to news and the next one with a sub menu did the same thing. I also know its not my php for i put the same table code in a plain old html file and got the same result.

http://www.spiralex.net/test2/

Thanks in advance for the help.


Poster: Ruth
Dated: Monday February 19 2007 - 2:35:18 GMT

Hi,

I never noticed you are way down level on the menu. Download the newest version 5.770. It gives you the regular dhtml menu, so don't unzip to your working folder. Make sure you put the 3 files you are now working with someplace to back them up in case you need to go back to that level.

Then you need to also download the newest treemenu.js file. Again, make sure you don't overwrite what you have in case you have to go back.

http://www.milonic.com/menumodules.php

The treemenu is about the middle of the page.

Once you have the newest files, go back to your collapse data file and put the main menu back in it. Leave the position='relative'; and don't leave the drawMenus with the main menu. Just the one that's at the end of the file.

Then at the top, right below the line
_
Code:
subOffsetLeft=0;  // Sub menu offset Left position


put this line

buildAfterLoad=true;

Then on your page, put the calls for all the files into the table cell where you want the menu to appear.

Code:
<TD vAlign=top align=middle width=210 bgColor=#ffdb74>
     <SCRIPT language=JavaScript src="milonic_src.js"
type=text/javascript></SCRIPT>

<SCRIPT language=JavaScript>
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="collapse_test.js"
type=text/javascript></SCRIPT>

<SCRIPT language=JavaScript src="treemenu.js"
type=text/javascript></SCRIPT>
    </TD>


That should fix it.

As a note, you shouldn't put the collapse menu into a table cell unless that cell is longer than the menu when the longest submenu is opened. If you do, then when you click that long submenu it will force the table cell to expand downward and probably would make your layout look strange.

Ruth


Poster: Ruth
Dated: Monday February 19 2007 - 2:39:53 GMT

Hi,

I meant to thank you for the test page! :D

Ruth


Poster: TheStealth
Dated: Monday February 19 2007 - 2:43:45 GMT

Thanks for the help again and your welcome. I like to give the most info when asking questions. While browsing the forums for answers i saw you wanted to see the page a lot so i included it>


Poster: Ruth
Dated: Monday February 19 2007 - 2:58:55 GMT

Hi,

Well, you shouldn't be using an embed main menu file anymore. You should put the main menu back in the collapse_test.js file. So embed file will be gone. Also, if you do not have to support Netscape 4+ you can change the calls for the files to the following. There are still some who need to support NN4+ and Milonic provides for that, but depending on what you are doing, you may not need to support it. You can usually check your stats to see if anyone using NN4 visits the site.

Code:
<script type="text/javascript" src="milonic_src.js"></script>   
<script type="text/javascript" src="mmenudom.js"></script>
<script type="text/javascript" src="collapse_test.js"></script>


As to includes, I know some people use them and I would guess you could make an include file with the calls for the menu files and just call the include in that cell, but I am not real knowledgeable about includes.

Ruth