Having problems with DHTML Menu? There is usually somebody here who knows the answer.
san
Beginner
Posts: 9 Joined: Sat Aug 23, 2003 11:16 pm
Post
by san » Sat Aug 23, 2003 11:25 pm
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;");
}
John
Team
Posts: 5967 Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:
Post
by John » Sun Aug 24, 2003 12:41 am
That's not enough to help us help you. Please post a URL.
John
san
Beginner
Posts: 9 Joined: Sat Aug 23, 2003 11:16 pm
Post
by san » Sun Aug 24, 2003 1:18 am
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.
Maz
Milonic God
Posts: 1717 Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:
Post
by Maz » Sun Aug 24, 2003 5:35 am
/*
*/
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
John
Team
Posts: 5967 Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:
Post
by John » Sun Aug 24, 2003 7:53 am
You have only defined sub menus. Nowhere have you defined a mainmenu to call those subs, so they just sit there doing nothing.
John
san
Beginner
Posts: 9 Joined: Sat Aug 23, 2003 11:16 pm
Post
by san » Sun Aug 24, 2003 10:13 am
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)
Maz
Milonic God
Posts: 1717 Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:
Post
by Maz » Sun Aug 24, 2003 10:54 am
I'm on another computer and it says mm_style undefined.
san
Beginner
Posts: 9 Joined: Sat Aug 23, 2003 11:16 pm
Post
by san » Sun Aug 24, 2003 11:28 am
it means main menu style ?
Maz
Milonic God
Posts: 1717 Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:
Post
by Maz » Sun Aug 24, 2003 11:43 am
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
John
Team
Posts: 5967 Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:
Post
by John » Mon Aug 25, 2003 3:26 pm
I see some menus and submenus there this morning. Things are looking better?
John
san
Beginner
Posts: 9 Joined: Sat Aug 23, 2003 11:16 pm
Post
by san » Mon Aug 25, 2003 3:33 pm
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
John
Team
Posts: 5967 Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:
Post
by John » Mon Aug 25, 2003 4:22 pm
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
Posts: 9 Joined: Sat Aug 23, 2003 11:16 pm
Post
by san » Tue Aug 26, 2003 7:03 am
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
John
Team
Posts: 5967 Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:
Post
by John » Tue Aug 26, 2003 3:18 pm
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
Posts: 9 Joined: Sat Aug 23, 2003 11:16 pm
Post
by san » Tue Aug 26, 2003 9:16 pm
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
John
Team
Posts: 5967 Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:
Post
by John » Tue Aug 26, 2003 9:18 pm
You did see that it was working, correct?
Thanks for letting me know, I have taken the code down now.
John
san
Beginner
Posts: 9 Joined: Sat Aug 23, 2003 11:16 pm
Post
by san » Tue Aug 26, 2003 9:30 pm
thank you very much for your help !
Simon
Hergio
Milonic God
Posts: 1123 Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY
Post
by Hergio » Tue Aug 26, 2003 10:02 pm
All I got to say for this thread is "whew"! And I didnt even particpate.
Dave Hergert
Software Engineer
"Helping to make the menu better, one
at a time."
John
Team
Posts: 5967 Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:
Post
by John » Tue Aug 26, 2003 10:23 pm
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
)
John