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:19
mm_style un defined
Poster: Stu
Dated: Tuesday August 19 2003 - 11:12:28 BST
i keep on getting this error message, I am running an asp page, does anyone know why or have had it before themselves???
Poster: Hergio
Dated: Tuesday August 19 2003 - 13:54:29 BST
Do you have a URL to post? The absolute best thing to have is a URL so we can not only see the error ourselves, but troubleshoot your code and tell you (usually down to the line) what the problem is
Off the top of my head, I would say you are either (1) Incorrectly defining a style, so look at all your style definitions and make sure they follow EXACTLY how they are displayed in the samples area. Or (2) you are referencing a style in one of your menus that doesn't exist.
But a URL is what you should give us.
Poster: Hergio
Dated: Tuesday August 19 2003 - 14:07:54 BST
I just notice you posted this question in the help and support forum too. Please keep posts to one forum. They will get answered, no matter where they are. Over posting causes unnecessary clutter and wastes space for other questions to be answered. We appreciate it. Thanks.
Poster: Andy
Dated: Tuesday August 19 2003 - 23:50:34 BST
It could be related to a missing style reference, it's definately something to do with the styles though.
Styles can be empty but they must at least be declared.
I could be wrong though. The menu is still quite new and we're not sure of all its problems yet.
Cheers
Andy
Poster: fredlongworthhighschool
Dated: Wednesday August 20 2003 - 8:08:41 BST
I would hazard a guess that one menu is calling a style that isn't there, usually down to a simple spelling error. Had it myself a couple of times.
_d is undefined
Poster: Stu
Dated: Wednesday August 20 2003 - 13:44:44 BST
Hello Guys,
First off, sorry for posting in two differnent topics Hergio, wont happen again!
Afraid I havent got an url to post as I am testing the menu on an Intranet.
All is going well now, started a fresh and havent got the 'mm_style undefined' error message again. But am getting ''_d' is undefined' now!
Before hand the menu wasnt even appearing with the first error message but now is appearing fine but still returning ''_d' is undefined.
Any idea's peeps?
I am calling my js from an asp page as follows:
Sub drawMenuBar()
Response.Write VBCrLf & VBCrLf & "<!-- ********* Start Dropdown Menu ********** -->" & VBCrLf
Response.Write "<SCRIPT LANGUAGE=""JavaScript"" SRC=""http://servername/foldername/includes2/mmenudom.js"" TYPE=""text/javascript""></SCRIPT>" & VBCrLf
Response.Write "<SCRIPT LANGUAGE=""JavaScript"" SRC=""http://servername/foldername/includes2/milonic_src.js"" TYPE=""text/javascript""></SCRIPT>" & VBCrLf
Response.Write "<SCRIPT LANGUAGE=""JavaScript"" SRC=""http://servername/foldername/includes2/menu_data.js"" TYPE=""text/javascript""></SCRIPT>" & VBCrLf
Response.Write "<!-- ********* End Dropdown Menu ********** -->" & VBCrLf & VBCrLf
End Sub
I am using the XP style menu.
Any help or suggestions would be of great assistance!
Cheers.
Poster: Hergio
Dated: Wednesday August 20 2003 - 14:49:09 BST
Dont include mmenudom into the page, milonic_src takes care of that for you. You will need to set the scriptpath in the milonic_src file to point where mmenudom is located. Milonic_src then ouputs an <SCRIPT src=mmenudom.js></SCRIPT> line into the head of your document, so essentially you are including it twice, that may be the cause of your error. Try that and get back to us. Otherwise, copy your menu_data file into a post.
Poster: Stu
Dated: Wednesday August 20 2003 - 15:24:35 BST
hergio,
cheers for the reply, tried that but menu not appearing now and getting 'object expected' error, line 29, char 1795.
Poster: John
Dated: Wednesday August 20 2003 - 16:28:47 BST
Stu, I know you said you're on an Intranet, but is there any way you can get it posted somewhere we can see it? As Dave said, it is so much easier for us to help you when we can see the error and the code.
Poster: Stu
Dated: Wednesday August 20 2003 - 16:41:21 BST
well here it goes lads...
this is my menu_data.js file
_menuCloseDelay=50 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=50 // The time delay before menus open on mouse over
_followSpeed=5 // Follow scrolling speed
_followRate=50 // Follow scrolling Rate
_subOffsetTop=2 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
_scrollAmount=3 // Only needed for Netscape 4.x
_scrollDelay=20 // Only needed for Netcsape 4.x
with(XPMainStyle=new mm_style()){
onbgcolor="#C1D2EE";
oncolor="#000000";
offbgcolor="#EFEDDE";
offcolor="#000000";
bordercolor="#8A867A";
borderstyle="solid";
borderwidth=1;
separatorcolor="#EFEDDE";
separatorsize="2";
padding=3;
fontsize="75%";
fontstyle="normal";
fontweight="normal";
fontfamily="Helvetica,Tahoma,Verdana";
subimagepadding="2";
onborder="1px solid #316AC5";
offborder="1px solid #cccccc";
}
with(XPMenuStyle=new mm_style()){
onbgcolor="#C1D2EE";
oncolor="#000000";
offbgcolor="transparent";
offcolor="#000000";
bordercolor="#8A867A";
borderstyle="solid";
borderwidth=1;
separatorcolor="#8A867A";
separatorpadding="2";
separatoralign="right";
separatorwidth="80%";
padding=3;
fontsize="75%";
fontstyle="normal";
fontweight="normal";
fontfamily="Helvetica,Tahoma,Verdana";
image="http://hook-iis02/stent/includes2/xpblank.gif";
subimage="http://hook-iis02/stent/includes2/arrow.gif";
onborder="1px solid #316AC5";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}
with(milonic=new menuname("Main Menu")){
style=XPMainStyle;
top=75;
screenposition="center";
alwaysvisible=1;
orientation="horizontal";
margin=4;
aI("text=Home;url=http://hook-iis02/stent;status=Back To Home Page;image=http://hook-iis02/stent/includes2/home.gif;separatorsize=1")
aI("text= Applications showmenu=applications;image=http://hook-iis02/stent/includes2/blocks.gif;separatorsize=1")
aI("text= Information showmenu=information;image=http://hook-iis02/stent/includes2/browser.gif;separatorsize=1")
aI("text= Reference showmenu=reference;separatorsize=1")
aI("text= Training showmenu=training;separatorsize=1")
aI("text= Framework showmenu=Framework;separatorsize=1")
aI("text= CAD showmenu=cad;separatorsize=1")
aI("text= Help showmenu=help;separatorsize=1")
}
with(milonic=new menuname("applications")){
style=XPMenuStyle;
overflow="scroll";
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=Mapper;url=http://hook-iis02/stent/mapper;separatorsize=1")
aI("text=Telephone Directory;url=http://hook-iis02/stent/teleview;separatorsize=1")
aI("text=Who is Who;url=http://hook-iis02/stent/whoiswho/wiwmain.asp;separatorsize=1")
aI("text=Son of Sam Online;url=http://hook-iis02/stent/sos/default.asp;separatorsize=1")
aI("text=Site Data;url=http://hook-iis02/stent/sitedata;separatorsize=1")
}
with(milonic=new menuname("information")){
style=XPMenuStyle;
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=BB Staff Vacancies;url=http://hook-iis02/stent/staff_vac/staff_vac.asp;separatorsize=1")
aI("text=Cautionary Tales;url=http://hook-iis02/stent/tales/tales.asp;separatorsize=1")
aI("text=CIRIA;url=http://hook-iis02/stent/ciria/ciria.asp;separatorsize=1")
aI("text=General Information;url=http://hook-iis02/stent/information/info.asp;separatorsize=1")
aI("text=Innovation;url=http://hook-iis02/stent/innovation/innovation.asp;separatorsize=1")
aI("text=Meetings & Lectures;url=http://hook-iis02/stent/meetings/meetings.asp;separatorsize=1")
aI("text=News;url=http://hook-iis02/stent/news;separatorsize=1")
aI("text=Projects;url=http://hook-iis02/stent/projects/projects.asp;separatorsize=1")
aI("text=Research & Development;url=http://hook-iis02/stent/research/research.asp;showmenu=rdcontents;separatorsize=1")
aI("text=Social Web;url=http://hook-iis02/stent/social/social.asp;separatorsize=1")
}
with(milonic=new menuname("rdcontents")){
style=XPMenuStyle;
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=Delay Data;url=http://hook-iis02/stent/research/delayd.asp;separatorsize=1")
aI("text=SIRIS;url=http://hook-iis02/stent/research/siris.asp;showmenu=scontents;separatorsize=1")
aI("text=SAPPAR;url=http://hook-iis02/stent/research/sappar.asp;separatorsize=1")
aI("text=Auto Postioning;url=http://hook-iis02/stent/research/auto.asp;separatorsize=1")
aI("text=QPID;url=http://hook-iis02/stent/research/qpid.asp;separatorsize=1")
aI("text=The Paperless Site;url=http://hook-iis02/stent/research/paperless.asp;separatorsize=1")
aI("text=Just-in-Time Pile Design;url=http://hook-iis02/stent/research/jitpd.asp;separatorsize=1")
aI("text=Intelligent Augers;url=http://hook-iis02/stent/research/intelligent.asp;separatorsize=1")
aI("text=Grant Assisted Research Projects;url=http://hook-iis02/stent/research/grant.asp;separatorsize=1")
}
with(milonic=new menuname("scontents")){
style=XPMenuStyle;
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=Using the Client Viewer;url=http://hook-iis02/stent/research/siris_viewer.asp;separatorsize=1")
aI("text=A Guide to the Interpretation of Pile Logs;url=http://hook-iis02/stent/research/siris_logs.asp;separatorsize=1")
aI("text=The Continuous Flight Auger (CFA) Process;url=http://hook-iis02/stent/research/siris_cfa.asp;separatorsize=1")
}
with(milonic=new menuname("reference")){
style=XPMenuStyle;
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=AGD Crane Hire Prices;url=http://hook-iis02/stent/reference/agd-crane.asp;separatorsize=1")
aI("text=Company Initiatives;url=http://hook-iis02/stent/initiatives/initiatives.asp;status=Opens the Company Initiatives page;separatorsize=1")
aI("text=CFA Rig Capabilities;url=http://hook-iis02/stent/reference/cfa-capa.asp;separatorsize=1")
aI("text=Design Information;url=http://hook-iis02/stent/design/design.asp;separatorsize=1")
aI("text=FPS Information;url=http://hook-iis02/stent/reference/fps.asp;separatorsize=1")
aI("text=Piling Techniques;url=http://hook-iis02/stent/ptechniques/ptechniques.asp;separatorsize=1")
aI("text=Premier Concrete Prices;url=http://hook-iis02/stent/reference/premier.asp;separatorsize=1")
aI("text=Polymer;url=http://hook-iis02/stent/polymer/polymer.asp;separatorsize=1")
aI("text=Weldex Crane Hire Prices;url=http://hook-iis02/stent/reference/weldex.asp;separatorsize=1")
aI("text=Raynesway Crane Hire Prices;url=http://hook-iis02/stent/reference/raynes-plant.asp;separatorsize=1")
aI("text=Rig Noise Surveys;showmenu=ncontents;separatorsize=1")
}
with(milonic=new menuname("ncontents")){
style=XPMenuStyle;
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=LDP Fleet;url=http://hook-iis02/stent/nsurveys/ldpnoise.asp;separatorsize=1")
aI("text=CFA Fleet;url=http://hook-iis02/stent/nsurveys/cfanoise.asp;separatorsize=1")
aI("text=Pre-Cast Fleet;url=http://hook-iis02/stent/nsurveys/prenoise.asp;separatorsize=1")
aI("text=SSP Fleet;url=http://hook-iis02/stent/nsurveys/sspnoise.asp;separatorsize=1")
}
with(milonic=new menuname("Training")){
style=XPMenuStyle;
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=Investors In People;url=http://hook-iis02/stent/training/IIP.asp;separatorsize=1")
aI("text=Training Core Plan;url=http://hook-iis02/stent/training/training.asp;separatorsize=1")
aI("text=ICE Training;url=http://hook-iis02/stent/training/icetraining.asp;showmenu=icontents;separatorsize=1")
}
with(milonic=new menuname("icontents")){
style=XPMenuStyle;
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=Core Objectives;separatorsize=1")
aI("text=Essays & Essay Topics;separatorsize=1")
aI("text=Routes to Membership;separatorsize=1")
aI("text=CPD Lectures & Training Days;url=http://hook-iis02/stent/training/cpd.asp;separatorsize=1")
aI("text=Training Gossip;separatorsize=1")
aI("text=Delegated & Supervising Engineers;separatorsize=1")
}
with(milonic=new menuname("framework")){
style=XPMenuStyle;
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=Company Policies;url=http://hook-iis02/stent/framework/co_policies_foreword.asp;showmenu=fcontents;status=Company Policies;image=http://hook-iis02/stent/includes2/xppreview.gif;separatorsize=1")
aI("text=HSEQ;showmenu=hcontents;status=HSEQ;separatorsize=1")
}
with(milonic=new menuname("fcontents")){
style=XPMenuStyle;
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=Worksafe Policy;url=http://hook-iis02/stent/framework/co_policies_wksafe.asp;separatorsize=1")
aI("text=IT Policy;url=http://hook-iis02/stent/framework/co_policies_it.asp;separatorsize=1")
aI("text=IT Policy - Full Version;url=http://hook-iis02/stent/framework/ITPoliciesandGoodPracticeV131.pdf;separatorsize=1")
aI("text=Health & Saftey Policy;url=http://hook-iis02/stent/framework/co_policies_hs.asp;separatorsize=1")
aI("text=Environmental Policy;url=http://hook-iis02/stent/framework/co_policies_environ.asp;separatorsize=1")
aI("text=Quality Policy;url=http://hook-iis02/stent/framework/co_policies_qual.asp;separatorsize=1")
aI("text=HSEQ Training Policy;url=http://hook-iis02/stent/framework/co_policies_train.asp;separatorsize=1")
aI("text=Alcohol & Drugs Policy;url=http://hook-iis02/stent/framework/co_policies_aldr.asp;separatorsize=1")
aI("text=Smoking Policy;url=http://hook-iis02/stent/framework/co_policies_smoke.asp;separatorsize=1")
aI("text=Equal Opportunities Policy;url=http://hook-iis02/stent/framework/co_policies_equal.asp;separatorsize=1")
aI("text=Human Rights Policy;url=http://hook-iis02/stent/framework/co_policies_human.asp;separatorsize=1")
aI("text=Ethical Trading Policy;url=http://hook-iis02/stent/framework/co_policies_eth.asp;separatorsize=1")
aI("text=Whistleblowing Policy;url=http://hook-iis02/stent/framework/co_policies_whistle.asp;separatorsize=1")
aI("text=HSEQ Organisation;url=http://hook-iis02/stent/framework/co_policies_hseqorg.asp;separatorsize=1")
aI("text=Appendix A: HSEQ Organisation in Stent & BBSHD;url=http://hook-iis02/stent/framework/co_policies_a.asp;separatorsize=1")
aI("text=Appendix B: Responsibilities & Duties;url=http://hook-iis02/stent/framework/co_policies_b.asp;separatorsize=1")
}
with(milonic=new menuname("hcontents")){
style=XPMenuStyle;
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=HSEQ Newsletters;url=http://hook-iis02/stent/framework/hseqnletters.asp;separatorsize=1")
aI("text=Remedials & Customer Surveys;url=http://hook-iis02/stent/framework/hseqrem.asp;separatorsize=1")
aI("text=Index of Assessments in Work Area;url=http://hook-iis02/stent/framework/hseq_assesswork.asp;separatorsize=1")
}
with(milonic=new menuname("cad")){
style=XPMenuStyle;
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=CAD Introduction;url=http://hook-iis02/stent/cad/cad.asp;separatorsize=1")
aI("text=Contract Drawings;url=http://hook-iis02/stent/cad/cad_contract.asp;separatorsize=1")
aI("text=Pre Cast Pile Types;url=http://hook-iis02/stent/cad/cad_precast.asp;separatorsize=1")
}
with(milonic=new menuname("help")){
style=XPMenuStyle;
bgimage="http://hook-iis02/stent/includes2/winxp.gif";
margin=4;
aI("text=General;url=http://hook-iis02/stent/help/help.asp;separatorsize=1")
aI("text=Whip! Viewer;url=http://hook-iis02/stent/help/whip.asp;separatorsize=1")
aI("text=What is an Intranet;url=http://hook-iis02/stent/whatisanintranet/wiai.asp;separatorsize=1")
}
drawMenus();
----------------------------------------------------------------------------
I have specified where my mmenudom.js file is in the milonic_src.js file as follows:
//scriptpath="http://hook-iis02/stent/includes2/mmenudom.js";
The error I get is:
Line: 29
Char: 1795
Error: Object expected
Code:0
The file that is returning this error is the milonic_src.js file.
And when using the script debugger it highlights '_drawMenu(_a)'
Poster: John
Dated: Wednesday August 20 2003 - 16:46:19 BST
Apparently I didn't word that well enough. I meant posted on a server Live action is the key to fast help.
On the flip of that, your _src file is wrong. Read the notes in the file again. It calls for a directory location for your menu files, not a URL or a specific file.
Poster: Hergio
Dated: Wednesday August 20 2003 - 17:09:25 BST
Quote:
I have specified where my mmenudom.js file is in the milonic_src.js file as follows:
//scriptpath="http://hook-iis02/stent/includes2/mmenudom.js";
//scriptpath="http://hook-iis02/stent/includes2/mmenudom.js";
What you should have is either "http://hook-iis02/stent/includes2/" or "/stent/includes2/" as your scriptpath...as John said, it will look inside that directory for mmenudom.
Also, I am not sure how javascript savvy you are, but if you copied that line directly out of your milonic_src file, the // in front of the line means its commented out and doesn't get read. Take the two slashes out so it can read the scriptpath.
Poster: John
Dated: Wednesday August 20 2003 - 18:29:51 BST
Hergio wrote:
Also, I am not sure how javascript savvy you are, but if you copied that line directly out of your milonic_src file, the // in front of the line means its commented out and doesn't get read. Take the two slashes out so it can read the scriptpath.
Good catch, Dave. Thanks.
It's a little "Code Blue" around here this morning and I missed that in the ruckus.
no more errors!!!!!!!!
Poster: Stu
Dated: Thursday August 21 2003 - 8:51:24 BST
Bingo!
Cheers for the much needed help guys!
All working ok!