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: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:19

First submenu not appearing on Relative positioning main men


Poster: heyapat
Dated: Tuesday August 19 2003 - 2:07:52 BST

Please Help!!
I have a problem when I use relative positioning of the main menu.
Under the first menu item of the main menu, there should be a drop down sub-menu which is not appearing. The rest of the sub-menus seem to be appearing ok.

You can see my beta site up here:

http://www-er.ucsd.edu/alumni_beta/_men ... u_test.htm

Below is the code of the menu_data.js file:




_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 // The time delay before menus open on mouse over
_followSpeed=5 // Follow scrolling speed
_followRate=40 // Follow scrolling Rate
_subOffsetTop=100 // Sub menu top offset
_subOffsetLeft=100 // Sub menu left offset
_scrollAmount=3 // Only needed for Netscape 4.x
_scrollDelay=20 // Only needed for Netcsape 4.x

with(HeaderStyle=new mm_style()){
onbgcolor="#336699";
oncolor="#ffffff";
offbgcolor="#6699cc";
offcolor="#ffffff";
bordercolor="#296488";
borderstyle="solid";
borderwidth=0;
separatorcolor="#2D729D";
separatorsize="0";
padding=0;
fontsize="10";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=90)";
outfilter="Fade(duration=0.2)";
}


with(menuStyle=new mm_style()){
onbgcolor="#336699";
oncolor="#ffffff";
offbgcolor="#6699cc";
offcolor="#ffffff";
bordercolor="#ffffff";
borderstyle="solid";
borderwidth=0;
separatorcolor="#ffffff";
separatorsize="1";
padding=6;
fontsize="10";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=90)";
outfilter="Fade(duration=0.2)";
}

with(milonic=new menuname("program")){
style=menuStyle;
itemwidth=120;
aI("text=Events;url=www.ucsd.edu;");
aI("text=Awards;url=www.ucsd.edu;");
aI("text=Scholarships;url=www.ucsd.edu;");
aI("text=Travel;url=www.ucsd.edu;");
aI("text=Student Programs;url=www.ucsd.edu;");
aI("text=Email;url=www.ucsd.edu;");
}

with(milonic=new menuname("involved")){
style=menuStyle;

itemwidth=120;
aI("text=Membership;url=www.ucsd.edu;");
aI("text=Volunteer;url=www.ucsd.edu;");
aI("text=Make a Gift;url=www.ucsd.edu;");
aI("text=Update your Address;url=www.ucsd.edu;");
}

with(milonic=new menuname("connected")){
style=menuStyle;
itemwidth=120;
aI("text=Chapters & Groups;url=www.ucsd.edu;");
aI("text=Career Network;url=www.ucsd.edu;");
aI("text=Search for Alumni;url=www.ucsd.edu;");
aI("text=Discussion Boards;url=www.ucsd.edu;");
aI("text=Class Notes;url=www.ucsd.edu;");
aI("text=Alumni Business Directory;url=www.ucsd.edu;");
}



with(milonic=new menuname("about")){
style=menuStyle;
itemwidth=120;
aI("text=Our Goals;url=www.ucsd.edu;");
aI("text=Our People;url=www.ucsd.edu;");
aI("text=Suggestions & Feedback;url=www.ucsd.edu;");
aI("text=Contact Us;url=www.ucsd.edu;");
}


drawMenus();


Poster: John
Dated: Tuesday August 19 2003 - 15:40:28 BST

From one university webmaster to another - welcome to the best menu around - period :!:

The only thing I can see at quick glance is the following on your home page code...
Code:
aI("image=_m_progr_0.gif;overimage=_m_progr_1.gif; url=http

Note you have a space between =_m_progr_1.gif; and url=... I'm not sure how the menu handles that, but I think it should not be there.

Also, getting 404s on your sub menu links that are showing. You're using http://www.ucsd.edu, etc. Use a full URL, as http://www.ucsd.edu/.


Poster: Hergio
Dated: Wednesday August 20 2003 - 17:52:56 BST

To shore this up, I did a quick check to see what would happen if you did leave the space in between the ; and the url= and the verdict is.....
NO SPACES ALLOWED.
The url will not work when the space is there. From this I have drawn the conclusion that the menu parses up the menu data by searching for something along the lines of ";<keywork>=" so its important to eliminate any spaces.

P.S. This is a version 5 question.


Poster: heyapat
Dated: Wednesday August 20 2003 - 18:38:27 BST

thanks for the replies, I appreciate it, though
I have gotten rid of the space that you both mentioned, but the submenu still doesn't seem to show up...

I'm still not sure what will solve this problem. Perhaps it a bug in the new menu?


Poster: John
Dated: Wednesday August 20 2003 - 19:23:58 BST

Guess the other question I have to ask is why did you split the MainMenu script away from the rest of the code? Seems a bit inconvenient not having everything in the same place.

Also, it doesn't work that way :!:

Here's what I did on my system with your code...

1. Pull the 'Main Menu' code out of your HTML and put it back in the menu_data.js. Don't forget to remove all the leftover <script> tags, etc., from that <td>.

2. Replace what you had in the <td> (all the script stuff) with...
<script language="Javascript" src="menu_data.js" type="text/javascript"></script>

3. Remove the script call you just placed in #2 from the <head>.

4. Move the <script language="Javascript" src="milonic_src.js" type="text/javascript"></script> call from the <head> to the first line after the <body>. With v5 it should now work in either place, but I just like the <body> better.

5. Enjoy the first menu now dropping its sub as it should (at least it does over here).

Oh, BTW - if ASU should ever play UCSD I won't be able to help you any more (unless we win) :D


Poster: heyapat
Dated: Wednesday August 20 2003 - 20:09:39 BST

thanks that seems to be a great solution...

The reason I had seperated the code of the main menu into the page is because Milonic had suggested it that way! (when positioning the menu into a table cell...) I have noticed in other threads that other people seem
to be having the same problem as me (I think in the end it had been declared as a bug in Version 5).

see: http://www.milonic.com/forum/viewtopic.php?t=2289

Your way seems to work in the browsers I had tested though...

Thanks for your help...I'm sure if UCSD played ASU in anything besides women's volleyball or soccer we would lose!


Poster: John
Dated: Wednesday August 20 2003 - 21:11:58 BST

heyapat wrote:
The reason I had seperated the code of the main menu into the page is because Milonic had suggested it that way! (when positioning the menu into a table cell...) I have noticed in other threads that other people seem
to be having the same problem as me (I think in the end it had been declared as a bug in Version 5).

Hmmm - perhaps I should read more of what's on the board... :? I code it that way on my sites with no problems.
heyapat wrote:
Thanks for your help...

Pleasure. That's why we're here.
heyapat wrote:
I'm sure if UCSD played ASU in anything besides women's volleyball or soccer we would lose!

Actually we don't have anything up here on the West campus. Main does all the sports. Just had to be pesky :!: