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

Content of the First section of the menu can't be displayed


Poster: san
Dated: Saturday August 23 2003 - 23:25:27 BST

I use the menu V5 RC6

Symptom: the content of the first item of the menu can't never be displayed.

If I switch it: put the first in second position: it's content is displayed but not the content of the "new" first section

So the content of the first section appearing in the data file can't be displayed.

Workarround: creating a "false" first section that will never be displayed ?

But it's not very satisfying so any idea ??? :?:

here is the code of data section (menu_data.js) :

Code:
with(milonic=new menuname("machin")){
style=SubmenuStyle;
aI("text=Veille;url=unepage.html;");
aI("text=Accompagnements;url=unepage.html;");
aI("text=Groupes de discussion;url=unepage.html;");
}

with(milonic=new menuname("domaines")){
style=SubmenuStyle;
aI("text=bidule;url=rubrique-test.php3?id_rubrique=15;");
aI("text=truc;url=internal-test.php3?id_article=3;");
}

with(milonic=new menuname("projets")){
style=SubmenuStyle;
aI("text=Bio;url=page.html;");
aI("text=Euro;url=page.html;");
}
:?:


Poster: John
Dated: Sunday August 24 2003 - 0:41:28 BST

That's not enough to help us help you. Please post a URL.

URL


Poster: san
Dated: Sunday August 24 2003 - 1:18:40 BST

ok sorry

you'll found all the concerned files at this url :
http://www.info.fundp.ac.be/~san/test/menu/test/

home.html is just used to show the menu. All gif has been deleted because not useful for this case.

In menu_data the first menu is quoted. I put it there as a workarround. When the quotes are deleted all the following menu can be viewed in the page.
So the problem lie in this first menu.


Poster: Maz
Dated: Sunday August 24 2003 - 5:35:40 BST

/*
*/

Those stop the menu from being seen. Remove them.

Here:

Code:
/*
with(milonic=new menuname("TEST0")){
style=SubmenuStyle;
aI("text=TEST;url=unepage.html;");
aI("text=TEST;url=unepage.html;");
}*/


Regards
maz


Poster: John
Dated: Sunday August 24 2003 - 7:53:59 BST

You have only defined submenus. Nowhere have you defined a mainmenu to call those subs, so they just sit there doing nothing.

Mainmenu definition exist: in home.html


Poster: san
Dated: Sunday August 24 2003 - 10:13:34 BST

Quote:
You have only defined submenus. Nowhere have you defined a mainmenu to call those subs, so they just sit there doing nothing.


The main menu def exist at line 45 in home.html

And there it call the different submenu elements defined in menu_data.js

But the problem is the content of the first submenu contained in menu_data.js is not displayed.

So (rem for Maz) I created, in menu_data, a first submenu not used because of its first position (quoted in the posted example - just to permit to see the bug)


Poster: Maz
Dated: Sunday August 24 2003 - 10:54:22 BST

I'm on another computer and it says mm_style undefined.

mm_style undefined


Poster: san
Dated: Sunday August 24 2003 - 11:28:16 BST

it means main menu style ?


Poster: Maz
Dated: Sunday August 24 2003 - 11:43:12 BST

Its too late to focus, I'll post my style set up, try comparing.
These are 2 menus.

Code:
with(XPMainTopStyle=new mm_style()){
with(XPTopStyle=new mm_style()){

with(milonic=new menuname("TOP MENU")){
style=XPMainTopStyle;

with(milonic=new menuname("organization")){
style=XPTopStyle;   
................................repeated on submenus

with(XPMainToolStyle=new mm_style()){
with(XPToolStyle=new mm_style()){

with(milonic=new menuname("TOOLS MENU")){
style=XPMainToolStyle;

with(milonic=new menuname("disease")){
style=XPToolStyle;
.................................repeated on submenus


g'night
maz


Poster: John
Dated: Monday August 25 2003 - 15:26:18 BST

I see some menus and submenus there this morning. Things are looking better?

Sub menu


Poster: san
Dated: Monday August 25 2003 - 15:33:26 BST

Quote:
I see some menus and submenus there this morning. Things are looking better?


Hi !

Unfortunately no !
I think you can't see submenu of the first section entiteld TEST1. You just can see submenu content of TEST2, TEST3.

The only solution I found at this moment not implemented in the example URL) is to add, just before the section TEST1, an unused section "STUFF".

This section is not called in the main menu but stay first in the menu_data so the bug doesn't impact other menu.

But the root of the bug is always unknown :cry:


Poster: John
Dated: Monday August 25 2003 - 16:22:23 BST

Would like you to try something for me...

1. Move all your Main Menu script out of the <td> and back into menu_data.js where it was. Leave out the <script></script> and drawMenus();, of course, when you move the code back, but make sure they are deleted from the <td>. It should be empty.

2. Move the <SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT> call from the <head> to the <td> we just cleaned out. This call should be the only thing in the <td>.

I know the main site shows it being done as you had it, but for some reason a few of us are having trouble with that layout.

Let us know what happens.

It doesn't work ! + new example


Poster: san
Dated: Tuesday August 26 2003 - 7:03:58 BST

I'm very sorry and disapointed ! but It doesn't work

I create a new html file, a basic one in which I put only the script.

And the symptom is exactly the same !!!
So the origin of the problem lies in the javascript and not in the html (I suppose :? )

you found the file at :

http://www.info.fundp.ac.be/~san/test/menu/test/simple.html

It calls the same javascript menu. The only difference lies in the html code which is really basic

Thanks again for your help !! ;)

I continue my searches to solve this F*$! Bug ;)

Simon


Poster: John
Dated: Tuesday August 26 2003 - 15:18:33 BST

Actually, what you did is not exactly what I asked you to do.

I have taken your code and put it up on my server at http://www.west.asu.edu/sa/san/santest.htm and set it up per my instructions. It works as it should. Also note in menu_data.js the commented TEST0 'workaround' you had has been removed.

Just view source on that URL to see what I did, and get the menu_data at the same location (http://www.west.asu.edu/sa/san/menu_data.js).

Please let me know when you have the code so I can take it down.

sorry


Poster: san
Dated: Tuesday August 26 2003 - 21:16:17 BST

I'm very sorry !

But be sure I try your solution before adding the new html file

but I have make some mistakes because when I try your solution because the result was the same

Ok I've downloaded the file !!

Thankyou very much !!!!

:)

Simon


Poster: John
Dated: Tuesday August 26 2003 - 21:18:51 BST

You did see that it was working, correct?

Thanks for letting me know, I have taken the code down now.

ok !


Poster: san
Dated: Tuesday August 26 2003 - 21:30:22 BST

thank you very much for your help !

Simon


Poster: Hergio
Dated: Tuesday August 26 2003 - 22:02:01 BST

All I got to say for this thread is "whew"! And I didnt even particpate. 8O

Complete solution


Poster: san
Dated: Tuesday August 26 2003 - 22:09:15 BST

the complete solution found by jgillett is available at

http://www.info.fundp.ac.be/~san/test/menu/test/

I'll let the file few days so don't hesitate to download it



Simon ;)


Poster: John
Dated: Tuesday August 26 2003 - 22:23:56 BST

Glad you got it working, san. My 'fix' is a bit different from the example Andy has posted on the main site. Don't know if there's a bug or I just don't understand his version (probably the latter :D )

Thanks, John!


Poster: stephen702
Dated: Wednesday August 27 2003 - 17:47:37 BST

John's fix (moving the script call into the TD on the html page, and moving the Main Directory back to the js file) not only solved the problem of the first drop-down menu, but also made the entire menu work in Netscape 4.7. Before this, none of the menus dropped down in 4.7.

Thanks, John!


Poster: John
Dated: Wednesday August 27 2003 - 18:02:16 BST

Hey, great :!: That's one-in-a-row (for me) :D

Seriously, glad to hear it. I'm sure Andy will see this and figure out what's going on. Meanwhile, I've been running that way for some time with no problems (just don't tell my boss about the 4.7 stuff - I'm trying to dump support of that thing).