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

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
san
Beginner
Beginner
Posts: 9
Joined: Sat Aug 23, 2003 11:16 pm

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

Post by san »

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

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;");
}
:?:
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

That's not enough to help us help you. Please post a URL.
John
san
Beginner
Beginner
Posts: 9
Joined: Sat Aug 23, 2003 11:16 pm

URL

Post by san »

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.
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

/*
*/

Those stop the menu from being seen. Remove them.

Here:

Code: Select all

/*
with(milonic=new menuname("TEST0")){
style=SubmenuStyle;
aI("text=TEST;url=unepage.html;");
aI("text=TEST;url=unepage.html;");
}*/
Regards
maz
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

You have only defined submenus. Nowhere have you defined a mainmenu to call those subs, so they just sit there doing nothing.
John
san
Beginner
Beginner
Posts: 9
Joined: Sat Aug 23, 2003 11:16 pm

Mainmenu definition exist: in home.html

Post by san »

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)
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

I'm on another computer and it says mm_style undefined.
san
Beginner
Beginner
Posts: 9
Joined: Sat Aug 23, 2003 11:16 pm

mm_style undefined

Post by san »

it means main menu style ?
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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

Code: Select all

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

I see some menus and submenus there this morning. Things are looking better?
John
san
Beginner
Beginner
Posts: 9
Joined: Sat Aug 23, 2003 11:16 pm

Sub menu

Post by san »

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:
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
san
Beginner
Beginner
Posts: 9
Joined: Sat Aug 23, 2003 11:16 pm

It doesn't work ! + new example

Post by san »

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/m ... imple.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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
san
Beginner
Beginner
Posts: 9
Joined: Sat Aug 23, 2003 11:16 pm

sorry

Post by san »

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

You did see that it was working, correct?

Thanks for letting me know, I have taken the code down now.
John
san
Beginner
Beginner
Posts: 9
Joined: Sat Aug 23, 2003 11:16 pm

ok !

Post by san »

thank you very much for your help !

Simon
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

All I got to say for this thread is "whew"! And I didnt even particpate. 8O
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
san
Beginner
Beginner
Posts: 9
Joined: Sat Aug 23, 2003 11:16 pm

Complete solution

Post by san »

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 ;)
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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 )
John
Post Reply