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: Saturday July 14 2012 - 06:07:06

2 menus on one page


Poster: webmonkey8
Dated: Tuesday October 7 2003 - 15:47:10 BST

Is there a way you can have 2 master menus running on one page at a time? I'm using Menu version 3.3.19. Everytime I try to implement 2 or more on a page, I get this javascript error "stack overflow". I even renamed the js. files and have the second menu pointing to a different location. Can you help?


Poster: John
Dated: Tuesday October 7 2003 - 17:00:36 BST

The very first thing you need to do is upgrade to 3.5.15. This is the last release in the v3 series, which is no longer supported. Note that at your current version you are more than 20 releases down!

If that doesn't work, come on back and post a URL for us.

not working


Poster: webmonkey8
Dated: Thursday October 16 2003 - 21:32:01 BST

Ok, I have downloaded the version 3.5.15 menu and I still get that Javascript error message when I call 2 menus on the same page.
Eg,. Once menu is in a folder called 001 and the other is in a folder called 002. So essentially, I'm calling th same file "menu_array.js" from different folders. I call these file using an include statement. Call one of them works, but when calling 2 on the same page, it doesn't. Can you anyone help? Sorry I cannot post a URL since I'm working on an intranet.


Poster: Hergio
Dated: Thursday October 16 2003 - 21:33:40 BST

at the top of the menu_array files there is a nice long line of code that looks pretty cryptic. This line can only appear once per page. So leave it in your first menu file, and comment it out in the second file. See if that fixes the problem.

trouble


Poster: webmonkey8
Dated: Friday October 17 2003 - 16:46:11 BST

Ok, so I've setup an internet URL so you can take a look at my problem:
http://www.acsc.gov.ab.ca/menu/side_menu.htm

As you can see if you go to that page, you get a "Stack overflow error: Line 508".

I'm trying to implement 2 separate menus here. One (the top menu) is calling menu_array.js and mmenu.js and the secong menu (bottom) is calling menu_array02.js and mmenu02.js and I still get that error.

Please help! :cry:


Poster: Hergio
Dated: Friday October 17 2003 - 17:14:24 BST

Good, you commented out that line in the second menu_data file, ok. You need only ONE reference to mmenu in each page. So include your menu_data1 file (with the critical line in use), include your menu_data2 file (with the critical line commented out), and then include one mmenu file after all that.

Second, you still are using 3.3.15, go to the versions page on the milonic.com page and download 3.5 if you absolutely MUST stick with version 3. Otherwise I would recommend going to v5.

This should take care of things for you. Enjoy your Milonic Menu!


Poster: John
Dated: Friday October 17 2003 - 19:17:41 BST

Please keep in mind, the v3 series is no longer supported. v5 is really the way to go.

Take a look at http://tiggrsuccess.com/ for an example of 2 on the same page - one horizontal and one vertical.


Poster: webmonkey8
Dated: Friday October 17 2003 - 20:45:34 BST

It's still not working even when I have both menus point to ONE mmenu.js.
Take a look at my code, maybe I'm missing something, but I get the same error message. The first top menu is showing, but the exact same copy of it, below it, is blank:


<table width="161" border="0" cellspacing="0" cellpadding="0" bgcolor="B6C5C7">
<tr>
<td><img src="http://acscinfolinktest.gov.ab.ca/images/resources_sub.gif" width="161" height="18"></td>
</tr>
<tr>
<td height="10"><img src="images/spacer.gif" width="40" height="1"> <img src="images/spacer.gif" width="1" height="1">
</td>
</tr>
<tr>
<td> <p>
<script language=JavaScript src="menu_array.js" type=text/javascript></script>
<script language=JavaScript src="mmenu.js" type=text/javascript></script>
<br>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><br>
<br>
</p></td>
</tr>
</table>
<p>&nbsp;</p>
<table width="161" border="0" cellspacing="0" cellpadding="0" bgcolor="B6C5C7">
<tr>
<td><img src="http://acscinfolinktest.gov.ab.ca/images/resources_sub.gif" width="161" height="18"></td>
</tr>
<tr>
<td height="10"><img src="images/spacer.gif" width="40" height="1"> <img src="images/spacer.gif" width="1" height="1">
</td>
</tr>
<tr>
<td> <p>
<script language=JavaScript src="menu_array02.js" type=text/javascript></script>
<script language=JavaScript src="mmenu.js" type=text/javascript></script>
<br>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><br>
<br>
</p></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p>


Poster: Hergio
Dated: Friday October 17 2003 - 21:05:41 BST

No no no, you only include mmenu one time. This is exactly as you should do it.
Code:
<script language=JavaScript src="menu_array.js" type=text/javascript></script>
<script language=JavaScript src="menu_array02.js" type=text/javascript></script>
<script language=JavaScript src="mmenu.js" type=text/javascript></script>


Poster: webmonkey8
Dated: Saturday October 18 2003 - 7:58:37 BST

Well, it seems to work now! :) Thanks a lot!! Now I gotta customize. I found that having only one mmenu.js on my page would get rid of that "stack overload" error, which is what you said. Anyways, thanks for the help.


Poster: Hergio
Dated: Saturday October 18 2003 - 14:10:39 BST

Definetly no problem. That mmenu file initializes alot of things and have multiple copies of everything can definetly overwhelm the browser's memory. I can't stress enough though that you would benefit greatly by moving to version 5. Just a thought... ;) .