PDA

View Full Version : Jims DHTML Menu 5.7 - Second Level Menus



firemedic778
06-19-2005, 09:25 PM
Can anyone help I have installed the Jims DHTML Menu 5.7, however the second level menus do not work. See below:

http://www.71.westlexingtonfd.com/newindex.htm

jscheuer1
06-19-2005, 10:15 PM
Well, to start with you have these two tags on your page:
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" onload="init()" bgcolor="#C0C0C0">and:
<body onload="init()">You are only allowed one body tag per page. Get rid of the second one. If this doesn't fix it, there is probably a syntax error in your config.js file. Try this first and, with luck, we won't have to debug config.js. I'm pretty sure there is also a problem with config.js though, just can't seem to find it yet.

firemedic778
06-19-2005, 10:38 PM
I remove the extra onload that you suggested. Still not working though. Thanks for your help so far.

jscheuer1
06-19-2005, 11:14 PM
I've been looking at your config.js file. It is truly a mess. So much so that I cannot figure out what your intentions actually were. My suggestion is to start over. Read the tutorial.html that comes with this menu carefully. One error I noticed is that when you declare a menu item, the number at the end of the declaration is supposed to be the number of the item's submenu, not the number of subitems it has. There was more than that though, I think. Try getting just one main menu with just one submenu working and build from there, ex:


function init()
{
//Main Menu items:
menus[0] = new menu(22, "horizontal", 160, 10, -2, -2, "#CACAFF", "#0000A0", "Verdana,Helvetica", 9,
"bold", "bold", "black", "white", 1, "gray", 2, "rollover:images/tri-down1.gif:images/tri-down2.gif", false, true, true, true, 12, true, 4, 4, "black");
menus[0].addItem("http://www.dynamicdrive.com", "", 100, "center", "Home", 0);
menus[0].addItem("#", "", 120, "center", "Web Building", 1);
menus[0].addItem("#", "", 100, "center", "News", 0);
menus[0].addItem("#", "", 110, "center", "Search", 0);

//Sub Menu for 2nd Main Menu Item ("web building"):
menus[1] = new menu(135, "vertical", 0, 0, -5, -5, "#CACAFF", "#0000A0", "Verdana,Helvetica", 9, "bold",
"bold", "black", "white", 1, "gray", 2, "", false, true, false, true, 6, true, 4, 4, "black");
menus[1].addItem("http://www.dynamicdrive.com", "", 22, "left", "Dynamic Drive", 0);
menus[1].addItem("http://www.javascriptkit.com", "", 22, "left", "JavaScript Kit", 0);
menus[1].addItem("http://www.codingforums.com", "", 22, "left", "Coding Forums >", 0);
menus[1].addItem("http://www.builder.com", "NEWWIN", 22, "left", "Builder.com", 0);


} //OUTER CLOSING BRACKET. EVERYTHING ADDED MUST BE ABOVE THIS LINE.

firemedic778
06-20-2005, 12:19 AM
Thanks, I now have it working.