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:26
Error loading menu
Poster: Twill
Dated: Tuesday July 8 2003 - 6:51:43 BST
Hi there, I thought I had everything right, but when I try to load the page I get the following error, any idea where I went wrong?
Line: 70
Char: 7
Error: Expected ']'
Code: 0
URL: http://www.mysite.com/page_containing_menu.htm
I checked the menu_array.js and I am pretty sure I included all the ].
any suggestions?
Poster: Hergio
Dated: Tuesday July 8 2003 - 11:48:29 BST
I clicked the link, got a redirection to a aite concerning eBay auctions. No menu. Whats up with that? I'm not about to sign up for your product just to help with your menu if its located further into your site. Sorry. Post a link directly to the page with the menu so we can see whats wrong.
Poster: Twill
Dated: Tuesday July 8 2003 - 13:08:21 BST
appologies for that. I had no intention of trying to get you to sign up for anything ebay.
I do not currently have the menus running on my site as I do not want to take it down until I get the menus working.
....
I have put up a mock-up of the page it is intended for, but the final version will be within a frame.
You can visit the site here: http://www.guildsofganareth.com/update/top.htm
If you need to see what the page will eventually look like, with frames, you can visit http://www.guildsofganareth.com/update/
again, appologies for the confusion
Poster: John
Dated: Tuesday July 8 2003 - 15:50:12 BST
At quick glance I see at least a couple things.
First, you are, literally, 20-some levels down as far as the current version of the v3 menu is concerned. Current (and probably last) is 3.5.15, your code shows 3.3.19. Update, or even better go to the new v5. Find it at http://www.milonic.com/v5_rc1/menu.htm.
Next, there are a number of items in which the comments say, in part, "...(Leave this blank to disable)" (or something close to that). I notice you have added "" to each of these blank definitions. Leave 'em blank, as noted.
Another concern is your choice of font. Never heard of it, and I would doubt many folks have it (although I'm not sure that would hang up the menu). At any rate, you need to offer some additional font choices for those folks who don't have your one selection.
Bottom line - I'd move to v5 and then we'll go from there.
Poster: Twill
Dated: Tuesday July 8 2003 - 23:34:09 BST
ok, moving to version 5....I just pulled the lastest version posted at dynamic drive and used it...so it's pretty much just striaght out of the box, and palatino lintype is a standard windows font...at least it is on my comp
Poster: John
Dated: Tuesday July 8 2003 - 23:58:34 BST
Just a suggestion, but to be safe you should always get your updates directly from here. I have seen dynamicdrive more than 20 levels down on v3, although I don't know where they stand on v5.
As for the font, you're shooting yourself in the foot if you insist on specifying only one font. It's easy to provide for alternatives, and therefore keep a happy visitor. Windoze ain't the only OS out there
Poster: Twill
Dated: Wednesday July 9 2003 - 1:07:13 BST
OK, I updated to the new version.
You can now see it at http://english.guildsofganareth.com it's in the top frame.
I added extra fonts, you are right
I had it working on my local machine, but once I put it on the site, I dont get anything. So the old menu (dark grey background) is still there, with the .js one trying to come out to play, but not having much luck.
Thanks again for your help
Poster: John
Dated: Wednesday July 9 2003 - 15:33:41 BST
Frames ain't my favorite people, but we'll take a shot...
First off, put both of your menu <script> calls immediately after the <body>, not in the <head> as you have them.
Looking at top.js, I see a multitude of missing ';'; e.g. -
padding = 4
onborder="1px solid black"
subimageloc = "center;middle"
followscroll = "1,50,2"
etc.
All (and others) should be followed by a ';' (no quotes, of course). The only items that are not followed by a ';' are those at the top of the array; e.g. -
_menuCloseDelay=500
_menuOpenDelay=150
etc.
Also, aI statements need to have a closing ';' within the statement; e.g. -
Code:
aI("itemwidth=100;text=Contests;showmenu=contest menu");
...should be...
Code:
aI("itemwidth=100;text=Contests;showmenu=contest menu;");
Note the added closing ';' after 'menu'.
Also, not a problem but just a tip, any items you are not using, such as topbarimage = ""; (and, obviously, // items as well), can be dropped from the code. Cleans things up a lot. Andy has made it pretty smart.
See how bad all this messes you up
Poster: Twill
Dated: Wednesday July 9 2003 - 16:00:41 BST
Just got back from work, and need sleep, but I'll definately give all that a shot when I wake up
Thanks a bunch
Poster: Twill
Dated: Friday July 11 2003 - 0:03:32 BST
Well, I added ;'s up to wazoo, but didn't do too much.
it still works offline but not online.
any suggestions?
Poster: Hergio
Dated: Friday July 11 2003 - 2:19:48 BST
I did a search on your server for the file mmenudom.js just for curiousity and did not find it. Your milonic_src file specifies no scriptpath, so the file would have to be located in the same directory as everything else. The src.js file also was not editted so the filename should still be mmenudom.js. The mmenudom.js file is what is necessary for the menu to render in IE browsers, there is also one for netscape. I could not find them on your server. If you did not download them, you should also get those as well. That is why your menu isnt working. Your best bet is to go to the rc2 download page, http://www.milonic.com/v5_rc2/menu.htm and download the ZIP file. Don't get the source code from the page, get it all zipped up, it has all the required files in it.
Hope this was the problem and solves everything for ya!!!
Poster: Twill
Dated: Friday July 11 2003 - 3:40:11 BST
well what do you know...there it is
Didn't even know I needed that file. I thought it was just one of the others that was included
Thanks a bunch.
EDIT> Ok, so, got the menu working, but now it doesnt seem to want to go over my frame. Did I miss a code somewhere?
Is there documentation that I missed for the new version 5 because I am not sure what commands I can use nor where I can use them
Thanks again
Poster: Hergio
Dated: Friday July 11 2003 - 13:08:44 BST
So far I haven't seen any examples of frames with the new menu version. The last version had an option along the lines of
Code:
show-menu=databases target=main;sourceframe=main;
but i havent seen it yet in the new.
Searching through the source code for the menu, I haven't even seen any references to frames whatsoever, outside of iframes.
Andy has leaned towards this in the past, and I tend to agree, you should try and get away from frames as much as possible. They are tough to work with. You may want to try using an iframe in the center of your page. You can have the menu update into the iframe using target and the menus will render over the iframe with no problems.