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:21
URL Problem with top level menus
Poster: rcranswick
Dated: Friday July 2 2004 - 16:53:35 BST
This is probably going to be a fairly long post - apologies for that - I'll try and explain the problem as clearly as I can.
I have only tested this on Windows XP SP1 with IE6.
I am using v5.31a on my website at http://www.richardcranswick.com/. You will notice that all of the top level items in the menu have a link to another page. This is important to note for later.
The script used to generate the top level menu is (snippet):
Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=155;
left=200;
menuwidth=149;
itemwidth=149;
alwaysvisible=1;
orientation="vertical";
position="relative";
aI("text=Home;url=/;status=Back To Home Page;");
aI("text=About Me;url=/website/about/about.cfm;pagematch=about.cfm;");
aI("text=Credits;url=/website/credits/credits.cfm;pagematch=credits.cfm;");
aI("text=Downloads;url=/website/downloads/downloads.cfm;showmenu=Downloads;pagematch=downloads.cfm;");
aI("text=DVDs;url=/website/dvd/dvd.cfm;pagematch=dvd.cfm;");
aI("text=Funnies;url=/website/funnies/funnies.cfm;showmenu=Funnies;pagematch=funnies.cfm;");
aI("text=Games;url=/website/games/Games.cfm;showmenu=Games;pagematch=games.cfm;");
aI("text=Links;url=/website/links/links.cfm;pagematch=links.cfm;");
aI("text=News;url=/website/news/news.cfm;showmenu=News;pagematch=news.cfm;");
aI("text=Photos;url=/website/photos/photos.cfm;showmenu=Photos;pagematch=photos.cfm;");
aI("text=Products;url=/website/products/products.cfm;showmenu=Products;pagematch=products.cfm;");
} drawMenus();
style=menuStyle;
top=155;
left=200;
menuwidth=149;
itemwidth=149;
alwaysvisible=1;
orientation="vertical";
position="relative";
aI("text=Home;url=/;status=Back To Home Page;");
aI("text=About Me;url=/website/about/about.cfm;pagematch=about.cfm;");
aI("text=Credits;url=/website/credits/credits.cfm;pagematch=credits.cfm;");
aI("text=Downloads;url=/website/downloads/downloads.cfm;showmenu=Downloads;pagematch=downloads.cfm;");
aI("text=DVDs;url=/website/dvd/dvd.cfm;pagematch=dvd.cfm;");
aI("text=Funnies;url=/website/funnies/funnies.cfm;showmenu=Funnies;pagematch=funnies.cfm;");
aI("text=Games;url=/website/games/Games.cfm;showmenu=Games;pagematch=games.cfm;");
aI("text=Links;url=/website/links/links.cfm;pagematch=links.cfm;");
aI("text=News;url=/website/news/news.cfm;showmenu=News;pagematch=news.cfm;");
aI("text=Photos;url=/website/photos/photos.cfm;showmenu=Photos;pagematch=photos.cfm;");
aI("text=Products;url=/website/products/products.cfm;showmenu=Products;pagematch=products.cfm;");
} drawMenus();
Now try this URL http://www.richardcranswick.com/?TestMenu=.
You will notice a new menu item at the bottom of the menu. This item only contains a showmenu function (no url). Try the other top level items that previously had links to other pages - they now don't work!
The code used to generate this version of the menu is:
Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=155;
left=200;
menuwidth=149;
itemwidth=149;
alwaysvisible=1;
orientation="vertical";
position="relative";
aI("text=Home;url=/;status=Back To Home Page;");
aI("text=About Me;url=/website/about/about.cfm;pagematch=about.cfm;");
aI("text=Credits;url=/website/credits/credits.cfm;pagematch=credits.cfm;");
aI("text=Downloads;url=/website/downloads/downloads.cfm;showmenu=Downloads;pagematch=downloads.cfm;");
aI("text=DVDs;url=/website/dvd/dvd.cfm;pagematch=dvd.cfm;");
aI("text=Funnies;url=/website/funnies/funnies.cfm;showmenu=Funnies;pagematch=funnies.cfm;");
aI("text=Games;url=/website/games/Games.cfm;showmenu=Games;pagematch=games.cfm;");
aI("text=Links;url=/website/links/links.cfm;pagematch=links.cfm;");
aI("text=News;url=/website/news/news.cfm;showmenu=News;pagematch=news.cfm;");
aI("text=Photos;url=/website/photos/photos.cfm;showmenu=Photos;pagematch=photos.cfm;");
aI("text=Products;url=/website/products/products.cfm;showmenu=Products;pagematch=products.cfm;");
aI("text=Menu Test;showmenu=Downloads;");
} drawMenus();
style=menuStyle;
top=155;
left=200;
menuwidth=149;
itemwidth=149;
alwaysvisible=1;
orientation="vertical";
position="relative";
aI("text=Home;url=/;status=Back To Home Page;");
aI("text=About Me;url=/website/about/about.cfm;pagematch=about.cfm;");
aI("text=Credits;url=/website/credits/credits.cfm;pagematch=credits.cfm;");
aI("text=Downloads;url=/website/downloads/downloads.cfm;showmenu=Downloads;pagematch=downloads.cfm;");
aI("text=DVDs;url=/website/dvd/dvd.cfm;pagematch=dvd.cfm;");
aI("text=Funnies;url=/website/funnies/funnies.cfm;showmenu=Funnies;pagematch=funnies.cfm;");
aI("text=Games;url=/website/games/Games.cfm;showmenu=Games;pagematch=games.cfm;");
aI("text=Links;url=/website/links/links.cfm;pagematch=links.cfm;");
aI("text=News;url=/website/news/news.cfm;showmenu=News;pagematch=news.cfm;");
aI("text=Photos;url=/website/photos/photos.cfm;showmenu=Photos;pagematch=photos.cfm;");
aI("text=Products;url=/website/products/products.cfm;showmenu=Products;pagematch=products.cfm;");
aI("text=Menu Test;showmenu=Downloads;");
} drawMenus();
As you can see, all that changed is the addition of the Menu Test item.
Now try http://www.richardcranswick.com/?TestMenu2=.
The same Menu Test item is there, only now I've added a dummy URL parameter to read URL=# and now all the other items now link properly.
The code for this menu is:
Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=155;
left=200;
menuwidth=149;
itemwidth=149;
alwaysvisible=1;
orientation="vertical";
position="relative";
aI("text=Home;url=/;status=Back To Home Page;");
aI("text=About Me;url=/website/about/about.cfm;pagematch=about.cfm;");
aI("text=Credits;url=/website/credits/credits.cfm;pagematch=credits.cfm;");
aI("text=Downloads;url=/website/downloads/downloads.cfm;showmenu=Downloads;pagematch=downloads.cfm;");
aI("text=DVDs;url=/website/dvd/dvd.cfm;pagematch=dvd.cfm;");
aI("text=Funnies;url=/website/funnies/funnies.cfm;showmenu=Funnies;pagematch=funnies.cfm;");
aI("text=Games;url=/website/games/Games.cfm;showmenu=Games;pagematch=games.cfm;");
aI("text=Links;url=/website/links/links.cfm;pagematch=links.cfm;");
aI("text=News;url=/website/news/news.cfm;showmenu=News;pagematch=news.cfm;");
aI("text=Photos;url=/website/photos/photos.cfm;showmenu=Photos;pagematch=photos.cfm;");
aI("text=Products;url=/website/products/products.cfm;showmenu=Products;pagematch=products.cfm;");
aI("text=Menu Test;url=#;showmenu=Downloads;");
} drawMenus();
style=menuStyle;
top=155;
left=200;
menuwidth=149;
itemwidth=149;
alwaysvisible=1;
orientation="vertical";
position="relative";
aI("text=Home;url=/;status=Back To Home Page;");
aI("text=About Me;url=/website/about/about.cfm;pagematch=about.cfm;");
aI("text=Credits;url=/website/credits/credits.cfm;pagematch=credits.cfm;");
aI("text=Downloads;url=/website/downloads/downloads.cfm;showmenu=Downloads;pagematch=downloads.cfm;");
aI("text=DVDs;url=/website/dvd/dvd.cfm;pagematch=dvd.cfm;");
aI("text=Funnies;url=/website/funnies/funnies.cfm;showmenu=Funnies;pagematch=funnies.cfm;");
aI("text=Games;url=/website/games/Games.cfm;showmenu=Games;pagematch=games.cfm;");
aI("text=Links;url=/website/links/links.cfm;pagematch=links.cfm;");
aI("text=News;url=/website/news/news.cfm;showmenu=News;pagematch=news.cfm;");
aI("text=Photos;url=/website/photos/photos.cfm;showmenu=Photos;pagematch=photos.cfm;");
aI("text=Products;url=/website/products/products.cfm;showmenu=Products;pagematch=products.cfm;");
aI("text=Menu Test;url=#;showmenu=Downloads;");
} drawMenus();
Only difference here is the additionl of the URL=# to the Menu Test item.
I noticed this while working on another site which is less complex. Seems to be a bug. Easily worked around by adding the dummy URL. Can anyone confirm please?
Poster: kevin3442
Dated: Friday July 2 2004 - 18:47:23 BST
I've just tested locally. I can confirm the behavior exactly as you described in ie4.01 ie5.01, ie5.5, ie6, ns7.1, op6.05, and op7.2 (all in win2k).
Nice description with supporting URLs by the way. Made it easy to reproduce.
Kevin
Is it a bug then?
Poster: rcranswick
Dated: Friday July 2 2004 - 19:35:38 BST
Thanks Kevin.
I do a lot of this type of work myself so I know how frustrating it is when people just say "it doesn't work".
Anyway, what's the next step should I email Milonic or will you?
Poster: Andy
Dated: Monday July 5 2004 - 11:24:07 BST
Hi,
This is a bug and has been fixed for version 5.32 due out later today.
Cheers
Andy
Great News
Poster: rcranswick
Dated: Monday July 5 2004 - 12:01:23 BST
Thanks Andy, for the fast work and for this excellent menu system.
Poster: Andy
Dated: Monday July 5 2004 - 12:24:05 BST
I've just posted version 5.31b for testing, this will become 5.32 later today.
Can you please download the latest menu build and see if it helps?
Cheers
Andy
Good News
Poster: rcranswick
Dated: Monday July 5 2004 - 12:44:00 BST
Thanks Andy, that fixed the issue.