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

menustyle is undefined error


Poster: Listener
Dated: Friday April 1 2005 - 3:01:33 BST

Hi, trying to get the menu to work in a table. Yes I've read about it on the site and thought I had followed the directions.

Source of error: http://www.vancouverlacrosse.org/top3.asp

Code:
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>_top</title>
</head>

<body bgcolor="#7F95B2" topmargin="0"><SCRIPT language="JavaScript" src="http://www.vancouverlacrosse.org/hjs/milonic_src.js" type="text/javascript"></SCRIPT>
<script language="JavaScript">
if (parent.frames.length) { top.location=document.location;}
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=http://www.vancouverlacrosse.org/hjs/mmenuns4.js></scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=http://www.vancouverlacrosse.org/hjs/mmenudom.js></scr"+"ipt>");
</script>
<SCRIPT language="JavaScript" src="http://www.vancouverlacrosse.org/hjs/vl-menu_data.js" type="text/javascript"></SCRIPT>

<div align="center">
  <center>
  <table border="0" cellspacing="0" width="808" height="63" cellpadding="0" style="border-left-style: solid #000000; border-left-width: 1; border-right-width: 1; border-top-width: 1; border-bottom-width: 1">
    <tr>
      <td width="768" height="50" colspan="2">
      <img border="0" src="http://www.vancouverlacrosse.org/images/bg/row1.gif" width="768" height="50"></td>
      <td width="40" height="227" rowspan="5" background="images/bg/40x200.gif">
      &nbsp;</td>
    </tr>
    <tr>
      <td width="768" height="146" colspan="2">
      <map name="FPMap0">
      <area href="http://www.vancouverlacrosse.org/senior.asp" shape="circle" coords="58, 35, 33">
      <area href="http://www.vancouverlacrosse.org/field.asp" shape="circle" coords="133, 32, 32">
      <area href="http://www.vancouverlacrosse.org/minor.asp" shape="circle" coords="99, 88, 33">
      </map>
      <img border="0" src="http://www.vancouverlacrosse.org/images/bg/row2.gif" width="768" height="146" usemap="#FPMap0"></td>
    </tr>
    <tr>
      <td width="768" height="1" colspan="2">
      <img border="0" src="http://www.vancouverlacrosse.org/images/bg/row3.gif" width="768" height="4"></td>
    </tr>
    <tr>
      <td width="50" height="16">
      <img border="0" src="http://www.vancouverlacrosse.org/images/bg/row4a.gif" width="50" height="16"></td>
      <td width="718" height="16" bgcolor="#FFFFFF"><script>
with(milonic=new menuname("Mainmenu")){
style=menuStyle;
top=208;
left=117;
alwaysvisible=1;
orientation="horizontal";
position="relative";
aI("text=Home/News;showmenu=News;url=http://www.vancouverlacrosse.org/index2.asp;status=Back To Home Page;");
aI("text=Scheds;showmenu=Schedules;");
aI("text=Stats;showmenu=Statistics;");
aI("text=Rosters;showmenu=Rosters;");
aI("text=Photos;showmenu=Photos;title=Photo Gallery;");
aI("text=Information;showmenu=Information;");
aI("text=Forum;showmenu=Forums;");
aI("text=Links;showmenu=Links;");
aI("text=Contacts;showmenu=Contacts;title=Contact Us;");
}
drawMenus();
      </script>
      </td>
    </tr>
    <tr>
      <td width="768" height="14" colspan="2" bgcolor="#FFFFFF">
      <img border="0" src="http://www.vancouverlacrosse.org/images/bg/row5.gif" width="50" height="14"></td>
    </tr>
  </table>
  </center>
</div>

</body>

</html>


Which results in this message using MSIE 6.0

Image

I'm cross-eyed looking for this problem and you expert assistance would be appreciated.

Thank you


Poster: Ruth
Dated: Friday April 1 2005 - 4:10:56 BST

Well, uncross the eyes :!: This is something I have done a number of times, so don't feel too bad. Take a look at this line in your main menu
Code:
with(milonic=new menuname("Mainmenu")){
style=menuStyle;
The only problem is that there is no menuStyle defined in the vl_menu_data.js file.

Ruth


Poster: Listener
Dated: Friday April 1 2005 - 5:12:19 BST

Ruth wrote:
Well, uncross the eyes :!:
LOL, thxs.

Ruth wrote:
Take a look at this line in your main menu
Code:
with(milonic=new menuname("Mainmenu")){
style=menuStyle;
The only problem is that there is no menuStyle defined in the vl_menu_data.js file.


Ummm, I disagree becuase I think this is the defined style:



Code:
with(horizStyle=new mm_style()){
styleid=1;
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=0;
fontfamily="tahoma, arial";
fontsize="71%";
fontstyle="normal";
headerbgcolor="#FFFFFF";
headerborder=0;
headercolor="#EDEDED";
overfilter="Fade(duration=0.2);Alpha(opacity=100);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)"
screenposition="center"
bgimage="http://www.vancouverlacrosse.org/hjs/1x16-nav.gif"
offcolor="#FFFFFF";
onbgcolor="#EDEDED";
onborder="1px solid #333333";
oncolor="#FFFFFF";
onsubimage="http://www.vancouverlacrosse.org/hjs/on_downboxed.gif";
overbgimage="http://www.vancouverlacrosse.org/hjs/backon_beige.gif";
padding=6;
pagebgcolor="#FFFFFF";
pagecolor="#FFFFFF";
pageimage="http://www.vancouverlacrosse.org/hjs/db_red.gif";
separatoralign="right";
separatorcolor="#0053A2";
separatorsize="1";
separatorwidth="85%";
subimage="http://www.vancouverlacrosse.org/hjs/downboxed.gif";
}


Isn't it Ruth ?


Poster: kevin3442
Dated: Friday April 1 2005 - 10:40:15 BST

Hi Listener,

I hope Ruth doesn't mind me jumping in. But I'm awake and this is a quick one:

Listener wrote:
Ummm, I disagree becuase I think this is the defined style:

Code:
with(horizStyle=new mm_style()){
...


Tis true... it is a defined style, but alas, not the defined style. ;) Your style is named horizStyle, but your menu is looking for a style named menuStyle. You gotta fix the name in one place or the other so that they are the same.

Cheers,

Kevin


Poster: Listener
Dated: Friday April 1 2005 - 16:17:47 BST

Thank you both I feel like a bit of a dunce just now but I'm happier. I do have a couple of more issues, to do with the style but not the error since that's now solved - thank you again. Should I start a new thread or carry on?

In the hope I may ask here ....

Source page: http://www.vancouverlacrosse.org/template.asp

Is there a way to establish a horizontal menu margin between the vertical spacers and the text?

And is there a way to make the menu auto fill the available cell space which is 718 pixels.

Lastly, I hope what setting controls how fast a submenu closes?
Example on source page given, Information, More Information (sub menu) takes a long time to close.

Thank you.


Poster: Ruth
Dated: Saturday April 2 2005 - 23:03:19 BST

Listener wrote:
Is there a way to establish a horizontal menu margin between the vertical spacers and the text?


Add this to the horizontal menu style definition:
Code:
rawcss="padding:1px 3px 1px 3px";
That will make the padding in the item 1px at the top and bottom as you now have it, and 3px at right and left which will of course increase the space to the right and left of the separator.

Listener wrote:
And is there a way to make the menu auto fill the available cell space which is 718 pixels.


Try adding itemwidth=78; in the main menu on the page, just below position="relative";

Listener wrote:
Lastly, I hope what setting controls how fast a submenu closes?
Example on source page given, Information, More Information (sub menu) takes a long time to close.


You have keepalive=1; set in the style definitions, remove that.

The site looks really nice.

Ruth


Poster: Listener
Dated: Sunday April 3 2005 - 1:24:23 BST

Ruth,

Ruth wrote:
The site looks really nice.


Thank you and your a wonder. Each of your suggestions worked to perfection. Once again thank you and Keith for your help.

I will most assuredly use this product in other design projects as they come up.

Listener
aka: John Vickers, Project Mgr. for
DD&H SERVICES


Poster: Listener
Dated: Sunday April 3 2005 - 1:25:22 BST

Oops :!: it's Kevin not Keith 8O


Poster: Ruth
Dated: Sunday April 3 2005 - 3:52:41 BST

Saturday night, bending the elbow, huh :} Have another beer :lol:

Ruth