PDA

View Full Version : Resolved AnyLink JS Drop Down Menu Help



travelgirl
05-15-2009, 04:17 PM
1) Script Title: AnyLink JS Drop Down Menu

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

3) Describe problem: I can't seem to get this to work. I'm not able to see any drop-down action. I'm just a graphic designer :)

Code:





<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/dropmenuindex.htm for full source code
***********************************************/

</script>

<link href="basic.css" rel="stylesheet" type="text/css" media="all">

<title>Boscov's Travel</title>

</head>

<body>

<table width="757" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="7"><img src="images/btheader_01.gif" width="757" height="140" /></td>
</tr>
<tr>
<td width="95"><a href="default.asp"><img src="images/btheader_02.gif" border=0 width="95" height="44"></a></td><td width="115"><a href="" class="menuanchorclass" rel="anylinkmenu1[mouseover"]"><img src="images/btheader_03.gif" border=0 width="115" height="44"></a></td><td width="100"><a href="" class="menuanchorclass" rel="anylinkmenu2"><img src="images/btheader_04.gif" border=0 width="100" height="44"></a></td><td width="121"><a href="" class="menuanchorclass" rel="anylinkmenu3"><img src="images/btheader_05.gif" border=0 width="121" height="44"></a></td><td width="110"><a href="" class="menuanchorclass" rel="anylinkmenu4"><img src="images/btheader_06.gif" border=0 width="110" height="44"></a></td><td width="98"><a href="" class="menuanchorclass" rel="anylinkmenu5"><img src="images/btheader_07.gif" border=0 width="98" height="44"></a></td><td width="118"><a href="" class="menuanchorclass" rel="anylinkmenu6"><img src="images/btheader_08.gif" border=0 width="118" height="44"></a></td>
</tr>
</table>
<br>


</body>

</html>

<script type="text/javascript">

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



Code from menucontent.js:




var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
anylinkmenu1.items=[
["Locations", "http://www.boscovstravel.com/locations.asp"],
["Upcoming Events", "http://www.boscovstravel.com/events.asp"],
["Join Our Team", "http://www.boscovstravel.com/resources.asp"],
["Terms & Conditions", "http://www.boscovstravel.com/terms.asp"] //no comma following last entry!
]



var anylinkmenu2={divclass:'anylinkmenu', inlinestyle:'width:150px; background:#FDD271', linktarget:''} //Second menu variable. Same precaution.
anylinkmenu2.items=[
["Group Travel", "http://www.boscovstravel.com/grouptravel.asp"],
["Weddings & Honeymoons", "http://www.boscovstravel.com/honeymoons/"],
["Travel Gift Registry", "http://www.boscovstravel.com/travel_registry.asp"],
["Gift Certificates" "http://www.boscovs.com/StoreFrontWeb/Department.bos?departmentNumber=1805010&storeId=10001&langId=-1&departmentId=37677"],
["Business Travel", "http://www.boscovsbusinesstravel.com/"],
["Meetings", "http://www.boscovsbusinesstravel.com/meetings_events.asp"],
["Incentives", "http://www.boscovsbusinesstravel.com/incentives.asp"] //no comma following last entry!
]



var anylinkmenu3={divclass:'anylinkmenu', inlinestyle:'width:150px; background:#FDD271', linktarget:''} //Second menu variable. Same precaution.
anylinkmenu3.items=[
["Locations", "http://www.boscovstravel.com/locations.asp"],
["Group Travel", "http://www.boscovstravel.com/grouptravel.asp"],
["Business Travel", "http://www.boscovsbusinesstravel.com/contact_us.asp"] //no comma following last entry!
]



var anylinkmenu4={divclass:'anylinkmenu', inlinestyle:'width:150px; background:#FDD271', linktarget:''} //Second menu variable. Same precaution.
anylinkmenu4.items=[
["Orlando & Disney", "http://www.boscovstravel.com/disney/charter.deplist.asp?SECTION=18"],
["Day Trips", "http://www.boscovstravel.com/tourlist.asp?CatID=4&SECTION=20"],
["Escorted Motorcoach Overnights Trips", "http://www.boscovstravel.com/tourlist.asp?CatID=1&SECTION=21"],
["Rainbow Tours", "http://www.boscovstravel.com/tourlist.asp?CatID=22&SECTION=39"],
["Luxury & Adventure", "http://www.boscovstravel.com/luxury.default.asp?SECTION=8"],
["Honeymoons", "http://www.boscovstravel.com/honeymoons/default.asp?SECTION=9"],
["Western US Tours", "http://www.boscovstravel.com/western/default.asp?SECTION=17"],
["Last Minute", "http://res99.lmdeals.com/?&SRC=10010585&SRC_AID=&SECTION=5"],
["Travel Impressions", "http://www.boscovstravel.com/ti/?SECTION=11"],
["Apple Vacations", "http://www.boscovstravel.com/apple.asp?SECTION=7"] //no comma following last entry!
]



var anylinkmenu5={divclass:'anylinkmenu', inlinestyle:'width:150px; background:#FDD271', linktarget:''} //Second menu variable. Same precaution.
anylinkmenu5.items=[
["Cruise Specials", "http://www.boscovstravel.com/vp/cruisespecials.asp?SECTION=14"],
["Boscov's Select Cruises", "http://www.boscovstravel.com/tourlist.asp?CatID=2&SECTION=15"],
["Search for Cruises", "http://boscovstravel.poweragentnet.com/"] //no comma following last entry!
]



var anylinkmenu6={divclass:'anylinkmenu', inlinestyle:'width:150px; background:#FDD271', linktarget:''} //Second menu variable. Same precaution.
anylinkmenu6.items=[
["Events", "http://www.boscovstravel.com/events.asp"],
["Helpful Links", "http://www.boscovstravel.com/leisure_travel_resources.asp"] //no comma following last entry!
]



Thank you in advance for any help!

ddadmin
05-17-2009, 07:16 PM
At a glance everything looks right. Please post a link to the page on your site that contains the problematic script so we can check it out.

travelgirl
05-18-2009, 02:22 PM
Thanks for your response. Here's the page in question:

http://boscovstravel.com/2009/header.asp

forum_amnesiac
05-18-2009, 02:55 PM
I haven't used this menu but I have noticed that in you code you have this :
rel="anylinkmenu1[mouseover"]" the instructions for implementing this indicate that as standard this should be
rel="anylinkmenu1 for mouseover effect.

You only need to add a suffix, '[click]', if you want it to work with onclick instead.

Try removing the suffix, it could work.

travelgirl
05-18-2009, 06:45 PM
Nope, no luck. Thanks for the suggestion.

By the way, this is an error that is showing up in IE:

Line: 179
Char: 2
Error: 'divclass' is null or not an object
Code: 0
URL: http://www.boscovstravel.com/2009/header.asp

What does this mean? Would this be the problem?

ddadmin
05-18-2009, 09:24 PM
There's a missing comma (in red) in the following line within your menucontents.js file:


["Gift Certificates", "http://www.boscovs.com/StoreFrontWeb/Department.bos?departmentNumber=1805010&storeId=10001&langId=-1&departmentId=37677"],

travelgirl
05-19-2009, 02:35 PM
That was it! Thank you so much! :)