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: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Wednesday July 18 2012 - 06:07:19

two menus, one page, one in table


Poster: teo
Dated: Friday November 1 2002 - 15:22:10 GMT

Ok, I'm attempting an ambitious change on our website which should be simpler since every page has a header server side include file, right?

Using my header.inc
I want one menu at the top, then later in a table another menu. td closes, but new td opens for the body of the calling htm file. Footer.inc closes the td.

I can't seem to get both to work. I either get one, but not the other or a stack over flow error and only one.
Here's one iteration of the code (header.inc) file:----------

<table width=800 border=0>
<tr>
<td width=800 align="center">
<img src="/images/banner.jpg" alt="" border="0">
</td>
</tr>
</table>
<SCRIPT language=JavaScript src="/include/menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="/include/mmenu.js" type=text/javascript></SCRIPT>
<p>
<table width="800" cellspacing="2" cellpadding="2" align="absMiddle">
<tr>
<td width=200 valign="top">

<SCRIPT language=JavaScript src="/include/mmenu.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="/include/incude2/menu_array.js" type=text/javascript></SCRIPT>
&nbsp;
</td>

<td valign="top">

end
-------

And the call page: test.bible.org/docs/maintoc.htm

By the way, I tried removing the lines 13-15 in the menu_array.js file, and it got rid of my stack overflow, but still didn't show the menu.

Thanks all.


Poster: trytrix
Dated: Sunday November 3 2002 - 16:39:33 GMT

Hi,

Just put the menu includes right under the <BODY> tag :
Code:
<BODY>
<SCRIPT language=JavaScript src="/include/mmenu.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="/include/menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="/include/incude2/menu_array.js" type=text/javascript></SCRIPT>
you only need to include the "mmenu.js" once !

For the table menu use the Placemenu() function i.e. :
Code:
<TD><script language=JavaScript>PlaceMenu("YourMenuHere")</script></TD>

See the example at :
http://www.milonic.com/menu/menusample.php?sampleid=21

Cheers,

Trytrix

(Hit me at http://www.ransbecca.be)

no body tags


Poster: teo
Dated: Monday November 4 2002 - 22:46:24 GMT

Thanks for the reply. The place menu code works, sort of.

I'm working in an include file, so no body tags. And which ever menu i put immediately before the mmenu.js is the menu that shows up.

This displays the sidebar menu:

<SCRIPT language=JavaScript src="/include/sidebar_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="/include/mmenu.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="/include/menu_array.js" type=text/javascript></SCRIPT>

and moving mmenu.js to the bottom displays the other menu.

Thanks again.


Poster: trytrix
Dated: Tuesday November 5 2002 - 11:44:13 GMT

Hi again,

This is probably due to the fact that you have not removed the line of code that sets up the menus in the second array.
Forgot to tell this, sorry...

What is happening is that your second menu is wiping out the first menu.
You need to remove the line of code that start with
menunum=0;menus=new Array();_d=docum . . . in the second array.

Greetings,

Trytrix

( Hit me at http://www.ransbecca.be )