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:29
Okay Shoot Meeeeeeeee
Poster: kendra
Dated: Saturday October 8 2005 - 18:43:55 BST
Okay this one is really wierd so maybe its a bug because it makes no sense to me
For some reason when I add a sub-menu to the first menu it wont work, I get a javascript object error.
If I take the submenu code and move it to ather menu it works fine and the error goes away. I noticed also when I try to add a submenu to the first one that the keypress.js also fails.
I know this dont even make sense, but I tried everything , its driving me nuts!
Heres an example
Code:
with(milonic=new menuname("Main Menu"))
{
alwaysvisible=1;
orientation="horizontal";
style=menuStyle;
position="relative";
aI("status=Home Page;text=Home;url=/index.php;");
aI("showmenu=1;status=classifieds;text=Classifieds;");
aI("showmenu=2;text=PaintBoard;");
aI("showmenu=3;text=PhotoBucket;");
aI("showmenu=4;text=WebMail;");
aI("showmenu=5;text=Games&Chat;");
aI("showmenu=6;text=Tools;");
}
drawMenus();
{
alwaysvisible=1;
orientation="horizontal";
style=menuStyle;
position="relative";
aI("status=Home Page;text=Home;url=/index.php;");
aI("showmenu=1;status=classifieds;text=Classifieds;");
aI("showmenu=2;text=PaintBoard;");
aI("showmenu=3;text=PhotoBucket;");
aI("showmenu=4;text=WebMail;");
aI("showmenu=5;text=Games&Chat;");
aI("showmenu=6;text=Tools;");
}
drawMenus();
Code:
/*
Milonic DHTML Menu - JavaScript Website Navigation System.
Version 5.732 - Built: Tuesday September 20 2005 - 17:10
Copyright 2005 (c) Milonic Solutions Limited. All Rights Reserved.
This is a commercial software product, please visit http://www.milonic.com/ for more information.
See http://www.milonic.com/license.php for Commercial License Agreement
All Copyright statements must always remain in place in all files at all times
******* PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE *******
License Number: 1000 for Unlicensed
*/
/*
-----------------------------------------------------
GLOBAL MENU SETTINGS
-----------------------------------------------------
*/
fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=+3;
_subOffsetLeft=-20;
/*
-----------------------------------------------------
ROOT-MENU CONFIGURATION
-----------------------------------------------------
*/
with(menuStyle=new mm_style()){
styleid=2;
bordercolor="#758CC9";
borderstyle="solid";
borderwidth=2;
fontfamily="Verdana, Tahoma, Arial";
fontsize="7pt";
fontstyle="normal";
fontweight="bold";
headerbgcolor="#608ED5";
headercolor="#608ED5";
image="/cms/menu/whitedots.gif";
imagepadding=6;
offbgcolor="#1B2C85";
offcolor="#ffffff";
onbgcolor="#608ED5";
oncolor="#ffffff";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.3);Alpha(opacity=80);Shadow(color=#777777', Direction=135, Strength=3)";
overimage="/cms/menu/whitedots.gif";
padding=6;
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#758CC9";
separatorsize=1;
subimage="/cms/menu/downarrow.gif";
subimagepadding=4;
}
/*
-----------------------------------------------------
SUB-MENU CONFIGURATION
-----------------------------------------------------
*/
with(submenuStyle=new mm_style()){
bordercolor="#758CC9";
borderstyle="solid";
borderwidth=2;
fontfamily="Verdana, Tahoma, Arial";
fontsize="7pt";
fontstyle="normal";
headerbgcolor="#608ED5";
headercolor="#000000";
offbgcolor="#1B2C85";
offcolor="#ffffff";
onbgcolor="#608ED5";
oncolor="#ffffff";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.3);Alpha(opacity=60);Shadow(color=#777777', Direction=135, Strength=5)";
padding=6;
pagebgcolor="#82B6D7";
pagecolor="608ED5";
separatorcolor="#758CC9";
separatorsize=1;
subimage="/cms/menu/rightarrow.gif";
subimagepadding=2;
}
/*
-----------------------------------------------------
MENU #1
CLASSIFIEDS
-----------------------------------------------------
*/
with(milonic=new menuname("1")){
margin=7;
style=submenuStyle;
aI("status=PaintBoard Gallery;text=View Gallery;url=/php/paint/;");
aI("status=Create New Drawing;text=Create New Drawing;url=/php/paint/editor.php;");
aI("status=ShoutBox;text=The ShoutBox;url=/php/paint/box.php;");
aI("status=ClubHouse;text=PaintBoard ClubHouse;url=/forums/index.php;");
}
/*
-----------------------------------------------------
MENU #2
PaintBoard
-----------------------------------------------------
*/
with(milonic=new menuname("2")){
margin=7;
style=submenuStyle;
aI("status=PaintBoard Gallery;text=View Gallery;url=/php/paint/;");
aI("status=Create New Drawing;text=Create New Drawing;url=/php/paint/editor.php;");
aI("status=ShoutBox;text=The ShoutBox;url=/php/paint/box.php;");
aI("status=ClubHouse;text=PaintBoard ClubHouse;url=/forums/index.php;");
}
/*
-----------------------------------------------------
MENU #3
PHOTOBUCKET
-----------------------------------------------------
*/
with(milonic=new menuname("3")){
margin=7;
style=submenuStyle;
aI("status=Login;text=My Albums;url=/img/index.php;");
aI("status=Register;text=Register;url=/img/signup.php?r=login;");
aI("status=Lost Password;text=Lost Password;url=/img/forgot.php?r=login;");
aI("showmenu=3b;status=Photobucket Lite;text=PhotoBucket Lite;");
}
/* ----> */
with(milonic=new menuname("3b")){
margin=7;
style=submenuStyle;
aI("text=Upload Photo;url=/mail/compose.email.php/;");
aI("text=How to use;url=/mail/index.php;");
}
/*
-----------------------------------------------------
MENU #4
WEBMAIL MENU
-----------------------------------------------------
*/
with(milonic=new menuname("4")){
margin=7;
style=submenuStyle;
aI("text=Compose Message;url=/mail/compose.email.php/;");
aI("text=Check for Mail;url=/mail/index.php;");
aI("text=Address Book;url=/mail/addressbook.view.php;");
aI("text=Sent Messages;url=/mail/index.php?folderid=-2;");
aI("text=Calendar;url=/mail/calendar.display.php;");
}
/*
-----------------------------------------------------
MENU #5
TOOLS MENU
-----------------------------------------------------
*/
with(milonic=new menuname("5")){
margin=7;
style=submenuStyle;
aI("text=Login;url=http://www.milonic.com/login.php;");
aI("text=Licenses;url=http://www.milonic.com/mylicenses.php;");
aI("text=Invoices;url=http://www.milonic.com/myinvoices.php;");
aI("text=Make Support Request;url=http://www.milonic.com/reqsupport.php;");
aI("text=View Support Requests;url=http://www.milonic.com/mysupport.php;");
aI("text=Your Details;url=http://www.milonic.com/mydetails.php;");
}
/*
-----------------------------------------------------
MENU #6
HELP&CONTACT US
-----------------------------------------------------
*/
with(milonic=new menuname("6")){
margin=7;
style=submenuStyle;
aI("text=Login;url=http://www.milonic.com/login.php;");
aI("text=Licenses;url=http://www.milonic.com/mylicenses.php;");
aI("text=Invoices;url=http://www.milonic.com/myinvoices.php;");
aI("text=Make Support Request;url=http://www.milonic.com/reqsupport.php;");
aI("text=View Support Requests;url=http://www.milonic.com/mysupport.php;");
aI("text=Your Details;url=http://www.milonic.com/mydetails.php;");
}
Milonic DHTML Menu - JavaScript Website Navigation System.
Version 5.732 - Built: Tuesday September 20 2005 - 17:10
Copyright 2005 (c) Milonic Solutions Limited. All Rights Reserved.
This is a commercial software product, please visit http://www.milonic.com/ for more information.
See http://www.milonic.com/license.php for Commercial License Agreement
All Copyright statements must always remain in place in all files at all times
******* PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE *******
License Number: 1000 for Unlicensed
*/
/*
-----------------------------------------------------
GLOBAL MENU SETTINGS
-----------------------------------------------------
*/
fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=+3;
_subOffsetLeft=-20;
/*
-----------------------------------------------------
ROOT-MENU CONFIGURATION
-----------------------------------------------------
*/
with(menuStyle=new mm_style()){
styleid=2;
bordercolor="#758CC9";
borderstyle="solid";
borderwidth=2;
fontfamily="Verdana, Tahoma, Arial";
fontsize="7pt";
fontstyle="normal";
fontweight="bold";
headerbgcolor="#608ED5";
headercolor="#608ED5";
image="/cms/menu/whitedots.gif";
imagepadding=6;
offbgcolor="#1B2C85";
offcolor="#ffffff";
onbgcolor="#608ED5";
oncolor="#ffffff";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.3);Alpha(opacity=80);Shadow(color=#777777', Direction=135, Strength=3)";
overimage="/cms/menu/whitedots.gif";
padding=6;
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#758CC9";
separatorsize=1;
subimage="/cms/menu/downarrow.gif";
subimagepadding=4;
}
/*
-----------------------------------------------------
SUB-MENU CONFIGURATION
-----------------------------------------------------
*/
with(submenuStyle=new mm_style()){
bordercolor="#758CC9";
borderstyle="solid";
borderwidth=2;
fontfamily="Verdana, Tahoma, Arial";
fontsize="7pt";
fontstyle="normal";
headerbgcolor="#608ED5";
headercolor="#000000";
offbgcolor="#1B2C85";
offcolor="#ffffff";
onbgcolor="#608ED5";
oncolor="#ffffff";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.3);Alpha(opacity=60);Shadow(color=#777777', Direction=135, Strength=5)";
padding=6;
pagebgcolor="#82B6D7";
pagecolor="608ED5";
separatorcolor="#758CC9";
separatorsize=1;
subimage="/cms/menu/rightarrow.gif";
subimagepadding=2;
}
/*
-----------------------------------------------------
MENU #1
CLASSIFIEDS
-----------------------------------------------------
*/
with(milonic=new menuname("1")){
margin=7;
style=submenuStyle;
aI("status=PaintBoard Gallery;text=View Gallery;url=/php/paint/;");
aI("status=Create New Drawing;text=Create New Drawing;url=/php/paint/editor.php;");
aI("status=ShoutBox;text=The ShoutBox;url=/php/paint/box.php;");
aI("status=ClubHouse;text=PaintBoard ClubHouse;url=/forums/index.php;");
}
/*
-----------------------------------------------------
MENU #2
PaintBoard
-----------------------------------------------------
*/
with(milonic=new menuname("2")){
margin=7;
style=submenuStyle;
aI("status=PaintBoard Gallery;text=View Gallery;url=/php/paint/;");
aI("status=Create New Drawing;text=Create New Drawing;url=/php/paint/editor.php;");
aI("status=ShoutBox;text=The ShoutBox;url=/php/paint/box.php;");
aI("status=ClubHouse;text=PaintBoard ClubHouse;url=/forums/index.php;");
}
/*
-----------------------------------------------------
MENU #3
PHOTOBUCKET
-----------------------------------------------------
*/
with(milonic=new menuname("3")){
margin=7;
style=submenuStyle;
aI("status=Login;text=My Albums;url=/img/index.php;");
aI("status=Register;text=Register;url=/img/signup.php?r=login;");
aI("status=Lost Password;text=Lost Password;url=/img/forgot.php?r=login;");
aI("showmenu=3b;status=Photobucket Lite;text=PhotoBucket Lite;");
}
/* ----> */
with(milonic=new menuname("3b")){
margin=7;
style=submenuStyle;
aI("text=Upload Photo;url=/mail/compose.email.php/;");
aI("text=How to use;url=/mail/index.php;");
}
/*
-----------------------------------------------------
MENU #4
WEBMAIL MENU
-----------------------------------------------------
*/
with(milonic=new menuname("4")){
margin=7;
style=submenuStyle;
aI("text=Compose Message;url=/mail/compose.email.php/;");
aI("text=Check for Mail;url=/mail/index.php;");
aI("text=Address Book;url=/mail/addressbook.view.php;");
aI("text=Sent Messages;url=/mail/index.php?folderid=-2;");
aI("text=Calendar;url=/mail/calendar.display.php;");
}
/*
-----------------------------------------------------
MENU #5
TOOLS MENU
-----------------------------------------------------
*/
with(milonic=new menuname("5")){
margin=7;
style=submenuStyle;
aI("text=Login;url=http://www.milonic.com/login.php;");
aI("text=Licenses;url=http://www.milonic.com/mylicenses.php;");
aI("text=Invoices;url=http://www.milonic.com/myinvoices.php;");
aI("text=Make Support Request;url=http://www.milonic.com/reqsupport.php;");
aI("text=View Support Requests;url=http://www.milonic.com/mysupport.php;");
aI("text=Your Details;url=http://www.milonic.com/mydetails.php;");
}
/*
-----------------------------------------------------
MENU #6
HELP&CONTACT US
-----------------------------------------------------
*/
with(milonic=new menuname("6")){
margin=7;
style=submenuStyle;
aI("text=Login;url=http://www.milonic.com/login.php;");
aI("text=Licenses;url=http://www.milonic.com/mylicenses.php;");
aI("text=Invoices;url=http://www.milonic.com/myinvoices.php;");
aI("text=Make Support Request;url=http://www.milonic.com/reqsupport.php;");
aI("text=View Support Requests;url=http://www.milonic.com/mysupport.php;");
aI("text=Your Details;url=http://www.milonic.com/mydetails.php;");
}
Okay so in menu 3 theres a submenu, this works great! BUT.. if move the 3b menu up to menu 1 it fails?? , anywwhere else it will work fine, except the first menu that has pull downs.
Is there some kinda wierd bug when adding a submenu in the first menu? because it dont make sense, I mean even if I just move the
Code:
aI("showmenu=3b;status=Photobucket Lite;text=PhotoBucket Lite;");
to the first menu it still gets a error?? but 2,3,4,5,6 it works??? I tried putting it just under and in order, I tried re-naming them ugh.. why why why lol
Kendra
Poster: Shap5202
Dated: Sunday October 9 2005 - 1:50:22 BST
Maybe the menu name conflicts with something?
Just a shot in the dark, maybe change the name from 3b to something more...distinct?
UPDATE: I cut and pasted your menus into a test file and the 3b sub-menu displayed fine, no JS errors. Worked in both FF and IE. Used v5.732 of the menu
Poster: Ruth
Dated: Sunday October 9 2005 - 1:51:05 BST
Hi Kendra,
I just made a page with a table, pasted your main menu into it, copied your data file and test it. That works fine. Then I cut the aI string for the showmenu=3b and put it into menu 1, again it worked fine. I think you'll have to post a page with the problem so we can check what's going on, since we can't duplicate the problem on this end with the provided info.
Ruth