Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:36

mm_style is undefined


Poster: faithadopt
Dated: Monday August 1 2005 - 17:55:03 BST

Hello,

I am still trying to resolve an error message on my site (mm_style is undefined). I read the two posts that discuss this topic: http://www.milonic.com/mfa/2005-April/005890.html and http://www.milonic.com/mfa/2004-March/003793.html but still cannot resolve the issue.

The site: http://www.faithadopt.org/

Hoping someone may be able to see what I am missing and assist.

Thanks for the help.

Best, Eric

Code is below.
Code:
Code:
_menuCloseDelay=1000;
_menuOpenDelay=150;
_subOffsetTop=5;
_subOffsetLeft=-5;

with(menuStyle=new mm_style()){
bordercolor="#fdca97";
borderstyle="ridge";
borderwidth=2;
offbordercolor="#fdca97";
onbordercolor="#996633";
fontfamily="Verdana, Arial, Helvatica";
fontsize="85%";
fontstyle="normal";
headerbgcolor="#996633";
headercolor="#000000";
offbgcolor="#996633";
offcolor="#fdca97";
onbgcolor="#fdca97";
oncolor="#996633";
ondecoration="underline";
outfilter="randomdissolve(duration=0.2)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=5)";
padding=5;
pagebgcolor="#996633";
pagecolor="#fdca97";
separatorcolor="#fdca97";
separatorsize=2;
subimage="http://www.faithadopt.org/db_red3.gif";
subimagealign="left";
subimagepadding=1;
position="relative";
followscroll=1;
}

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
left=125;
style=menuStyle;
top=230;
itemwidth=20;
itemheight=30;
followscroll=1;
position="relative";
aI("status=Back To Home Page;text=Home;url=http://www.faithadopt.org;");
aI("showmenu=Programs;text=Programs;");
aI("showmenu=Adoption Steps;text=Adoption Steps;");
aI("showmenu=What's New;text=What's New;");
aI("showmenu=Photos;text=Photos;");
aI("showmenu=Relief Work;text=Relief Work;");
aI("showmenu=Faith Families;text=Faith Families;");
aI("showmenu=Resources;text=Resources;");
aI("status=Contact Us;text=Contact Us;url=http://www.faithadopt.org/home/contact;");
}

with(milonic=new menuname("Programs")){
style=menuStyle;
aI("showmenu=China;status=China;text=China;");
aI("showmenu=Vietnam;status=Vietnam;text=Vietnam;");
aI("showmenu=Nepal;status=Nepal;text=Nepal;");
aI("showmenu=Panama;status=Panama;text=Panama;");
}

with(milonic=new menuname("China")){
style=menuStyle;
aI("text=China Program;url=http://www.faithadopt.org/home/programs/china;");
aI("text=China Program FAQ;url=http://www.faithadopt.org/home/programs/china/faq/;");
aI("text=China Singles Info;url=http://www.faithadopt.org/home/programs/chinasingles/faq/;");
aI("showmenu=China Special Needs Program;status=China Special Needs Program;text=China Special Needs Program;");
aI("text=CCAA;url=http://www.faithadopt.org/home/ccaa;");
aI("text=China Pen Pal Program;url=http://www.faithadopt.org/home/penpal/;");
aI("text=Haddick Family Trip 2004;url=http://www.faithadopt.org/home/haddick/;");
}

with(milonic=new menuname("China Special Needs Program")){
style=menuStyle;
aI("text=China Special Needs FAQ;url=http://www.faithadopt.org/home/programs/chinaspecialneeds/faq/;");
aI("text=China Special Needs Children;url=http://www.faithadopt.org/home/programs/chinaspecialneeds/children;");
}

with(milonic=new menuname("Vietnam")){
style=menuStyle;
aI("text=Vietnam Program;url=http://www.faithadopt.org/home/programs/vietnam;");
aI("text=Vietnam Program FAQ;url=http://www.faithadopt.org/home/programs/vietnam/faq/;");
}

with(milonic=new menuname("Nepal")){
style=menuStyle;
aI("text=Nepal Program;url=http://www.faithadopt.org/home/programs/nepal;");
aI("text=Nepal Program FAQ;url=http://www.faithadopt.org/home/programs/nepal/faq/;");
aI("text=Nepal Child Sponsorship;url=http://www.faithadopt.org/home/programs/nepal/sponsor;");
}

with(milonic=new menuname("Panama")){
style=menuStyle;
aI("text=Panama Program;url=http://www.faithadopt.org/home/programs/panama;");
aI("text=Panama Program FAQ;url=http://www.faithadopt.org/home/programs/panama/faq/;");
}

with(milonic=new menuname("Adoption Steps")){
style=menuStyle;
aI("text=Adoption Steps;url=http://www.faithadopt.org/home/adoptionsteps/;");
aI("text=Adoption Forms;url=http://www.faithadopt.org/home/forms/;");
}

with(milonic=new menuname("What's New")){
style=menuStyle;
aI("text=What's New;url=http://www.faithadopt.org/home/whatsnew/;");
aI("text=What's New China;url=http://www.faithadopt.org/home/whatsnew/?f=china&nid=0&full=true;");
aI("text=What's New Vietnam;url=http://www.faithadopt.org/home/whatsnew/?f=vietnam&nid=0&full=true;");
aI("text=What's New Nepal;url=http://www.faithadopt.org/home/whatsnew/?f=nepal&nid=0&full=true;");
aI("text=What's New Panama;url=http://www.faithadopt.org/home/whatsnew/?f=panama&nid=0&full=true;");
}

with(milonic=new menuname("Photos")){
style=menuStyle;
aI("text=Photos page 1;url=http://www.faithadopt.org/home/photos1/;");
aI("text=Photos page 2;url=http://www.faithadopt.org/home/photos2/;");
aI("text=Photos page 3;url=http://www.faithadopt.org/home/photos3/;");
aI("text=Photos page 4;url=http://www.faithadopt.org/home/photos4/;");
aI("text=Photos page 5;url=http://www.faithadopt.org/home/photos5/;");
aI("text=Photos page 6;url=http://www.faithadopt.org/home/photos6/;");
aI("text=Photos page 7;url=http://www.faithadopt.org/home/photos7/;");
aI("text=Photos page 8;url=http://www.faithadopt.org/home/photos8/;");
aI("text=Photos page 9;url=http://www.faithadopt.org/home/photos9/;");
aI("text=Photos page 10;url=http://www.faithadopt.org/home/photos10/;");
}

with(milonic=new menuname("Relief Work")){
style=menuStyle;
aI("text=Relief Work page 1;url=http://www.faithadopt.org/home/relief;");
aI("text=Relief Work page 2;url=http://www.faithadopt.org/home/relief2;");
aI("showmenu=Sri Lanka orphan relief;status=Sri Lanka;text=Sri Lanka Relief Work;");
}

with(milonic=new menuname("Sri Lanka orphan relief")){
style=menuStyle;
aI("text=Overview;url=http://www.faithadopt.org/home/tsunami/;");
aI("text=Updates;url=http://www.faithadopt.org/home/tsunami/updates;");
aI("text=Photos;url=http://www.faithadopt.org/home/tsunami/photos;");
aI("text=Donors;url=http://www.faithadopt.org/home/tsunami/donors;");
aI("text=Relief projects;url=http://www.faithadopt.org/home/tsunami/relief;");
aI("text=Faith in the news;url=http://www.faithadopt.org/home/tsunami/news;");
}

with(milonic=new menuname("Faith Families")){
style=menuStyle;
aI("text=Faith Families;url=http://www.faithadopt.org/home/families;");
aI("text=Testimonials;url=http://www.faithadopt.org/home/testimonials;");
}

with(milonic=new menuname("Resources")){
overflow="scroll";
style=menuStyle;
aI("status=To Resource Page;text=Resource Page;url=http://www.faithadopt.org/home/resources;");
aI("showmenu=General;text=General;");
aI("showmenu=Books;text=Books;");
aI("showmenu=Book and Cultural Gift Catologs;text=Book and Cultural Gift Catologs;");
aI("showmenu=Magazines;text=Magazines;");
aI("showmenu=Organizations;text=Organizations;");
aI("showmenu=Advocacy and Intercountry Adoption Information;text=Advocacy and Intercountry Adoption Information;");
aI("showmenu=Government;text=Government;");
aI("showmenu=Puget Sound Area Resources;text=Puget Sound Area Resources;");
aI("showmenu=Chicago Area Resources;text=Chicago Area Resources;");
aI("showmenu=Faith Family Resources;text=Faith Family Resources Area Resources;");
}

with(milonic=new menuname("General")){
style=menuStyle;
aI("text=Faith Families;url=http://www.faithadopt.org/home/families;");
aI("text=Testimonials;url=http://www.faithadopt.org/home/testimonials;");
}

with(milonic=new menuname("Books")){
style=menuStyle;
aI("text=Faith Families;url=http://www.faithadopt.org/home/families;");
aI("text=Testimonials;url=http://www.faithadopt.org/home/testimonials;");
}

with(milonic=new menuname("Book and Cultural Gift Catalogs")){
style=menuStyle;
aI("text=Faith Families;url=http://www.faithadopt.org/home/families;");
aI("text=Testimonials;url=http://www.faithadopt.org/home/testimonials;");
}

with(milonic=new menuname("Magazines")){
style=menuStyle;
aI("text=Faith Families;url=http://www.faithadopt.org/home/families;");
aI("text=Testimonials;url=http://www.faithadopt.org/home/testimonials;");
}

with(milonic=new menuname("Organizations")){
style=menuStyle;
aI("text=Faith Families;url=http://www.faithadopt.org/home/families;");
aI("text=Testimonials;url=http://www.faithadopt.org/home/testimonials;");
}

with(milonic=new menuname("Advocacy and Intercountry Adoption Information")){
style=menuStyle;
aI("text=Faith Families;url=http://www.faithadopt.org/home/families;");
aI("text=Testimonials;url=http://www.faithadopt.org/home/testimonials;");
}

with(milonic=new menuname("Government")){
style=menuStyle;
aI("text=Faith Families;url=http://www.faithadopt.org/home/families;");
aI("text=Testimonials;url=http://www.faithadopt.org/home/testimonials;");
}

with(milonic=new menuname("Puget Sound Area Resources")){
style=menuStyle;
aI("text=Faith Families;url=http://www.faithadopt.org/home/families;");
aI("text=Testimonials;url=http://www.faithadopt.org/home/testimonials;");
}

with(milonic=new menuname("Chicago Area Resources")){
style=menuStyle;
aI("text=Faith Families;url=http://www.faithadopt.org/home/families;");
aI("text=Testimonials;url=http://www.faithadopt.org/home/testimonials;");
}

with(milonic=new menuname("Faith Family Resources")){
style=menuStyle;
aI("text=Faith Families;url=http://www.faithadopt.org/home/families;");
aI("text=Testimonials;url=http://www.faithadopt.org/home/testimonials;");
}

drawMenus();




and for the secondary nav:
Code:
Code:

<p>&nbsp;</p>

<img src="/images/transparent.gif" width="56" height="8" />

<SCRIPT language=JavaScript src="http://www.faithadopt.org/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=http://www.faithadopt.org/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=http://www.faithadopt.org/mmenudom.js><\/scr"+"ipt>"); </script>
<SCRIPT language=JavaScript src="http://www.faithadopt.org/menu_data_faith.js" type=text/javascript></SCRIPT>


Poster: John
Dated: Monday August 1 2005 - 23:29:42 BST

Your coding has me very confused. You have the menu code in there twice, and a separate drawMenus(); before you've called the _data file. Not exactly by the book... :?


Poster: Andy
Dated: Tuesday August 2 2005 - 12:34:14 BST

As John says, you are calling the menu_data file before executing the menu code files, this is causing the error because the datafile has not had the chance to be setup.

Also, you only need the menu script refernces and not the actual code itself.

Hope this helps,
Andy


Poster: faithadopt
Dated: Tuesday August 2 2005 - 16:54:22 BST

Hi John and Andy,

Thank you for the assistance on this. I guess I should have also said in the original e-mail that I am completely winging this and am a newbie times ten when it comes to this realm. I hate to say it, but I actually did not understand what you suggested :oops:

I am doing the website as a labor of love and certainly on the side for the agency I work for- so I would suppose there are many mistakes throughout. But it has been fun starting from scratch on this.

I will run through the literature again and see if I can figure out what you are both suggesting. Just wanted to say thanks for taking time out to look into this. It is appreciated.

Hope all is well, Eric


Poster: John
Dated: Wednesday August 3 2005 - 0:18:08 BST

Check the install.txt file in the download. Those menu calls, which you have in your code, are all you need. You have also added the raw JS code at the beginning of your page, which is wrong. Dump those.


Poster: Ruth
Dated: Wednesday August 3 2005 - 16:20:18 BST

Hi Eric,

I've been trying to figure out what's going on with your page. This will be a bit long...

In the head of your document you have a lot of stuff in script tags. Among those are a call for the menu_data_faith.js file and what looks like the copyright and all of the programming code. So,

1. eliminate the call for the menu_data_faith.js file
2. and eliminate the copyright and all the programming code that is in the script tags.

Next,

1. open the menu_data_faith.js file, cut out the main menu and paste it into it's own file.
2. Save the new faith file as menu_data_faith1.js so it won't overwrite the one you now have.
3. Save the new main menu file as menu_data_main.js It looks like this
Code:
with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
style=menuStyle;
itemwidth=20;
itemheight=30;
position="relative";
aI("status=Back To Home Page;text=Home;url=http://www.faithadopt.org;");
aI("showmenu=Programs;text=Programs;");
aI("showmenu=Adoption Steps;text=Adoption Steps;");
aI("showmenu=What's New;text=What's New;");
aI("showmenu=Photos;text=Photos;");
aI("showmenu=Relief Work;text=Relief Work;");
aI("showmenu=Faith Families;text=Faith Families;");
aI("showmenu=Resources;text=Resources;");
aI("status=Contact Us;text=Contact Us;url=http://www.faithadopt.org/home/contact;");
}

drawMenus();



Open your page and

1. right after the body tag put the call for the menu files excuding the menu_data_main.js It should look like this:

Code:
<BODY bgColor=#993366> <SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>"); </SCRIPT>
<SCRIPT src="menu_data_faith1.js"></SCRIPT>


2. go down to where you have the existing call for the menu files, remove ALL those calls and put in
Code:
<SCRIPT language=JavaScript
                  src="menu_data_main.js"
                  type=text/javascript></SCRIPT>


____________________

I have one more suggestion, but it's based on the assumption that this code is being used to open the submenu programs from your menu_data_faith.js file.
Code:
<SCRIPT type=text/javascript>
function showmenu(elmnt)
{
   //document.all(elmnt).style.visibility="visible"
}
function hidemenu(elmnt)
{
   document.all(elmnt).style.visibility="hidden"
}
</SCRIPT>
If that is being used to somehow show the programs submenu from the Milonic menu, why are you not just using the popup function that is built into the Milonic menu? To do that you would change your Programs link in that text link horizontal menu section to
Code:
<TD id=proglinks
          style="BORDER-RIGHT: #fdca97 1px solid; BACKGROUND-COLOR: #996633"
           align=middle>
        <a class=nav href="http://www.faithadopt.org/home/programs" onmouseover="popup('programs',1,1,-10)" onmouseout=popdown()>Programs</A> </TD>
The onmouseover="popup('programs',1)" calls the submenu 'programs', 1 tells it to use the X and Y mouse coordinates as the opening position of the submenu.

I hope that helps. I did the page accordingly and no longer get the error message. If you have any more questions just post back.

Ruth