PDA

View Full Version : AnyLink JS Drop Down Menu v2.0 - not working



mhcates
03-09-2009, 09:50 PM
1) Script Title: AnyLink JS Drop Down Menu v2.0

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

3) Describe problem: the menu will not show when moused over. It worked at first... then I added my links to the 2nd and 3rd anchor links in the "menucontents.js" file and they will not work any more. The script is below for both the body and the menucontents.js, and the rest of the files needed. Here is the script for my index page. It shows up correctly, it just will not function.


<html>
<head>

<link rel="stylesheet" type="text/css" href="anylinkmenu.css" />

<script type="text/javascript" src="menucontents.js"></script>

<script type="text/javascript" src="anylinkmenu.js">

/***********************************************
* AnyLink JS Drop Down Menu v2.0- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Project Page at http://www.dynamicdrive.com/dynamicindex1/.anylinkclass.htm for full source code
***********************************************/

</script>

</head>

<body>


<!--1st anchor link-->

<p><a href="http://www.dc-ag.com" class="menuanchorclass someotherclass" rel="anylinkmenu1" rev="lr">Wearables</a></p>

<b> </b>
<p><b>

<!--2nd anchor link-->

<p><a href="http://www.dc-ag.com" class="menuanchorclass someotherclass" rel="anylinkmenu2" rev="lr">Promotional Products</a></p>

<b> </b>
<p>

<!--3rd anchor link-->

<p><a href="http://www.dc-ag.com" class="menuanchorclass someotherclass" rel="anylinkmenu3" rev="lr">Awards & Recognition</a></p>






<script type="text/javascript">

//anylinkmenu.init("menu_anchors_class") //call this function at the very *end* of the document!
anylinkmenu.init("menuanchorclass")
</script>
</body>
</html>

This is my script for "menucontents.js" file that contains my links for the drop down menus.


var anylinkmenu1={divclass:'anylinkmenucols', inlinestyle:'', linktarget:'secwin'} //Third menu variable. Same precaution.
anylinkmenu1.cols={divclass:'column', inlinestyle:''} //menu.cols if defined creates columns of menu links segmented by keyword "efc"
anylinkmenu1.items=[
["Alpha Shirt", "http://www.4logoapparel.com"],
["Ash City", "http://www.ashcity.com/Home_US.aspx"],
["Callaway Golf", "http://www.callawaygolf.com"],
["Cap America", "http://www.capamerica.com"],
["Charles River Apparel", "http://www.charlesriverapparel.com", "efc"],
["Cutter &amp; Buck", "http://www.cbcorporate.com"],
["Dunbrooke", "http://www.dunbrooke.com"],
["Outdoor Cap", "http://www.outdoorcap.com"],
["Paramount Headwear", "http://www.paramountapparel.com"],
["River's End", "http://www.riversendtrading.com", "efc"],
["SanMar", "http://sanmar.com/index.jsp"]
//no comma following last entry!
]



var anylinkmenu2={divclass:'anylinkmenucols', inlinestyle:'', linktarget:'secwin'} //Third menu variable. Same precaution.
anylinkmenu2.cols={divclass:'column', inlinestyle:''} //menu.cols if defined creates columns of menu links segmented by keyword "efc"
anylinkmenu2.items=[
["3m", "http://www.3m.com/promote"],
["Adva-Lite", "http://www.asisupplier.com/32145"],
["Bic", "http://www.bicgraphic.com"],
["Brentwood", "http://www.brentwoodline.com/public"],
["Cross Pens", "http://www.mycrossbiz.com/global-corporate-catalog"],
["Crown Products", "http://www.crownprod.com"], "efc"],
["Executive Gifts", "http://www.execgifts-asi.com"],
["Glass America", "http://www.glassamerica.com"],
["Gold Bond", "http://www.goldbondinc.com"],
["Leed's", "http://www.leedsworld.com"],
["Norwood", "http://www.norwood.com"], "efc"],
["Sanford Specials", "http://dc-ag.com/sanfordb2bspecials.html"],
["Southern Plus", "http://www.southernplus.com"],
["Vitronic", "http://www.vitronicpromotional.com"]

//no comma following last entry!
]



var anylinkmenu3={divclass:'anylinkmenucols', inlinestyle:'', linktarget:'secwin'} //Third menu variable. Same precaution.
anylinkmenu3.cols={divclass:'column', inlinestyle:''} //menu.cols if defined creates columns of menu links segmented by keyword "efc"
anylinkmenu3.items=[
["J Charles Crystalworks", "http://www.jcharles.com"],
["Sterling Cut Glass", "http://www.sterlingcutglass.com/promo"]

//no comma following last entry!
]

ddadmin
03-09-2009, 10:41 PM
There are two errors in your menucontents.js file, specifically, the below two parts in red should NOT be there:


["Crown Products", "http://www.crownprod.com"], "efc"],
["Executive Gifts", "http://www.execgifts-asi.com"],
["Glass America", "http://www.glassamerica.com"],
["Gold Bond", "http://www.goldbondinc.com"],
["Leed's", "http://www.leedsworld.com"],
["Norwood", "http://www.norwood.com"], "efc"],

mhcates
03-10-2009, 09:32 PM
Awesome... I'll see if that fixes it.

Thank you for your help.