Error loading menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Twill
Advanced
Advanced
Posts: 16
Joined: Tue Jul 08, 2003 6:47 am

Error loading menu

Post by Twill »

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?
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Twill
Advanced
Advanced
Posts: 16
Joined: Tue Jul 08, 2003 6:47 am

Post by Twill »

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

Post by John »

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://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.
John
Twill
Advanced
Advanced
Posts: 16
Joined: Tue Jul 08, 2003 6:47 am

Post by Twill »

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

Post by John »

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 :!: ;)
John
Twill
Advanced
Advanced
Posts: 16
Joined: Tue Jul 08, 2003 6:47 am

Post by Twill »

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

Post by John »

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

aI("itemwidth=100;text=Contests;showmenu=contest menu");
...should be...

Code: Select all

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 ;)
John
Twill
Advanced
Advanced
Posts: 16
Joined: Tue Jul 08, 2003 6:47 am

Post by Twill »

Just got back from work, and need sleep, but I'll definately give all that a shot when I wake up :)

Thanks a bunch
Twill
Advanced
Advanced
Posts: 16
Joined: Tue Jul 08, 2003 6:47 am

Post by Twill »

Well, I added ;'s up to wazoo, but didn't do too much.

it still works offline but not online.

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

Post by Hergio »

I did a search on your server for the file mmenudom.js just for curiousity and did not find it. :idea: 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. :oops: 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://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!!!
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Twill
Advanced
Advanced
Posts: 16
Joined: Tue Jul 08, 2003 6:47 am

Post by Twill »

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
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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

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.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply