PDA

View Full Version : AnyLink JS Drop Down Menu v2.2



miketike2
03-05-2010, 07:02 PM
1) Script Title: :: AnyLink JS Drop Down Menu v2.2

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

3)Describe problem: Multiple drop down menus wont appear, the first menu "itemsmenu01" works and drops down fine, but the rest wont work.

i am new to javascript, but have years experience with other languages, i understand the concept and common sense of most scripts but i just dont understand what i am doing wrong here. I have fiddled with the script for the past 5 hours, ensuring everything is correct.

menucontents.js



var itemmenu01={divclass:'anylinkmenu', inlinestyle:'', linktarget:''}
itemmenu01.items=[
["God Items", "gitems.php"],
["Server Items", "sitems.php"],
["Set items", "stitems.php"],
["Crew Quest items", "cqitems.php"],
["Search Items", "seritems.php"]
]


var playermenu02={divclass:'anylinkmenu', inlinestyle:'', linktarget:''}
playermenu02.items=[
["Skill Data", "sdata.php"],
["Level Chart", "lchart.php"],
["Item Comparison", "itemcomp.php"],
["Gem Calculator", "gemcalc.php"],
["Stat Calculator", "statcalc.php"]
["Player Stats", "plastats.php"],
["Player Builder", "plabuild.php"],
["Time Frames", "tframes.php"]
]


var raidmenu03={divclass:'anylinkmenu', inlinestyle:'', linktarget:''}
raidmenu03.items=[
["God Raids", ""],
["Set Raids", ""],
["Crew Quest Raids", ""],
["Search Raids", ""]
]


var mapsmenu04={divclass:'anylinkmenu', inlinestyle:'', linktarget:''}
mapsmenu04.items=[
["God Items", ""],
["Server Items", ""],
["Set items", ""],
["Crew Quest items", ""],
["Search Items", ""]
]


var guidemenu05={divclass:'anylinkmenu', inlinestyle:'', linktarget:''}
guidemenu05.items=[
["God Items", ""],
["Server Items", ""],
["Set items", ""],
["Crew Quest items", ""],
["Search Items", ""]
]

Index Links


<table border="0" width="100%" cellspacing="0" cellpadding="0" background="images/blackline.gif">
<tr>
<td width="100%"><font color="#FFFFFF" face="Arial" size="2"><b>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="index.php" >Home</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="items.php" class="menuanchorclass" rel="itemmenu01">Items</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="players.php" class="menuanchorclass" rel="playermenu02">Players</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="raiddata.php" class="menuanchorclass" rel="raidmenu03">Raid Data</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="maps.php" class="menuanchorclass" rel="mapsmenu04">Maps</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="guides.php" class="menuanchorclass" rel="guidemenu05">Guides</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="contact.php" >Contact</a>&nbsp;&nbsp;|
</b></font></td></tr></table>


As you can tell all the "vars" match, and the first menu in the JS file works.
The site is in beta and not hosted or uploaded at the moment since all that is complete is the head of the site, all work is done through Dreamweaver with Firefox to debug.

I also searched these forums and found some information about AnyLink JS Drop Down Menu v2.2 but none to solve my issue.
I noticed i posted this in the wrong section, it belongs in the "Dynamic Drive scripts help" section.

Mike

jscheuer1
03-06-2010, 08:11 AM
Missing comma (here added in red):


var playermenu02={divclass:'anylinkmenu', inlinestyle:'', linktarget:''}
playermenu02.items=[
["Skill Data", "sdata.php"],
["Level Chart", "lchart.php"],
["Item Comparison", "itemcomp.php"],
["Gem Calculator", "gemcalc.php"],
["Stat Calculator", "statcalc.php"],
["Player Stats", "plastats.php"],
["Player Builder", "plabuild.php"],
["Time Frames", "tframes.php"]
]

miketike2
03-06-2010, 03:25 PM
Thank You so much, i added the comma and it Totally fixed the problem.

Mike