mm_style() undefined?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
kelemvor
Super Advanced
Super Advanced
Posts: 39
Joined: Mon Jun 17, 2002 2:05 am

mm_style() undefined?

Post by kelemvor »

Howdy,

I just took my old 3.4 file and ran it through the converter to see what would happen. I then took the result and just replaced my old menu_array.js file with the new one (of course I made a backup first).

When I view my web page locally now to test it, I don't get a menu but get the little error icon at the bottom of IE6. When I open it it says:

Error: 'mm_style' is undefined.

Do I need to do anything to the mmenu.js file at all or any other steps I need to take to get the upgrade to work? I didn't really see any isntructions anywhere other than to just stick my menu_array file in the converter.

Thanks.



EDIT:
Here's the first part of the menu_array file...


if(navigator.appVersion.indexOf("MSIE 6.0")>0)
{
effect="Fade(duration=0.2);Alpha(style=0,opacity=88);Shadow(color='#000000', Direction=135, Strength=5)"
}
else
{
effect="Shadow(color='#777777', Direction=135, Strength=5)"
}

_menuCloseDelay=500;
_menuOpenDelay=150;
_scrollAmount=3;
_scrollDelay=20;
_followSpeed=5;
_followRate=40;
_subOffsetTop=10;
_subOffsetLeft=10;


with(style1=new mm_style()){
offcolor="white";
offbgcolor="none";
oncolor="pink";
fontsize=11;
fontstyle="normal";
fontweight="bold";
fontfamily="Verdana, Arial";
padding=5;
subimage="arrow2.gif";
high3dcolor="#66ffff";
low3dcolor="#000099";
pagecolor="red";
headercolor="#ffffff";
separatorcolor="#3399ff";
}
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Did you follow the install docs that come with the download of the menu? You need to copy the milonic_src, the mmenudom, and the mmenuns4 files onto your server as well. Then you need to reference those files correctly in any pages that use the menu....the docs explain it all.
I just took my old 3.4 file and ran it through the converter to see what would happen. I then took the result and just replaced my old menu_array.js file with the new one (of course I made a backup first).
From this am guessing you just plugged your converted menu into your page, which uses all the old code. Download the menu samples and read the docs!
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

First, a tip - whenever posting code use the tags provided at the top of the posting page. A lot can get lost when you don't.

Based on your message I have to make quite a few assumptions, the main one being...

1. You just ran your _data file through the converter and then popped the result back on the server? If so, wouldn't it seem logical that since it's a v3 to v5 converter there might be some changes to the menu code as well that need to be loaded?

If (1 = true) then that is, obviously, the problem. Download the complete v5 from the main site, read the included install instructions (it is completely different than v3), and try again.

If (1 <> true), then my apologies. Post a URL (as requested) so we can see all your code and dig into it further to get you going.
John
kelemvor
Super Advanced
Super Advanced
Posts: 39
Joined: Mon Jun 17, 2002 2:05 am

Post by kelemvor »

Well as a suggestion to Milonic, maybe on he COnverter page it should have a note that says You will also need to download the sample menu to work with your newly converted file. There is no mention of this anywhere that I could see. Some simple Upgrade Instructions would be nice that would say which file to download and replace and things like that.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

When you've converted your menu there is a link provided to download the file. This will send you to a page with a link to either the converted file or the whole download that will include your converted menu. This will include everything you need.

-- Andy
Post Reply