PDA

View Full Version : AnyLink JS Drop Down Menu v2.0- LINK PROBLEM



eroles
11-02-2010, 12:31 AM
1) Script Title: mencontent.js

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

3) Describe problem: I have created a drop down menu using anylinkmenu.js
Here is an example of part of it:

var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
anylinkmenu1.items=[
["Easy Climbs", "alpine.html#easy"],
["Classic Mountaineering", "alpine.html#classic"],
["Harder Routes", "alpine.html#hard"]

So "Easy Climbs" should go to:
http://www.alpinism.com/NEW/alpine.html#easy

Once upon a time I put things in a folder called ALPINISM. This no longer exists and I cannot find it in ANY of the code but for some reason my link always goes to:

http://www.alpinism.com/New/ALPINISM/alpine.html#easy

Please help as it is driving me crazy.

Nile
11-02-2010, 12:32 AM
The link that you have directed us to is broken. Please provide a correct link so we can take a look.

eroles
11-02-2010, 12:33 AM
please look at the drop down menu on
http://www.alpinism.com/New/index.html

Nile
11-02-2010, 12:45 AM
LINE 166 in anylinkmenu.js (highlighted)

for (var i=0; i<menuobj.items.length; i++){
frag+='<li><a href="ALPINISM/' + menuobj.items[i][1] + '" target="' + menuobj.linktarget + '">' + menuobj.items[i][0] + '</a></li>\n'
if (menuobj.items[i][2]=="efc" || i==menuobj.items.length-1){

Get rid of the red.

Good luck! Respond back with results

BTW - Look at the top right:
http://localhostr.com/files/700edf/Screen%20shot%202010-11-01%20at%208.02.39%20PM.png

eroles
11-02-2010, 01:48 AM
Thank you. When I deleted the word in red the menu stopped working altogether. But then I just downloaded anylinkmenu.js again from your website and reloaded it and it works! Yahoo. Thanks for your help.

Nile
11-02-2010, 01:51 AM
No problem, I'm glad to help.

Here on DD, we like to keep things organized. In an effort to do so, you have the option to set a thread to resolved when an issue is fixed. To make the status of the thread resolved:
1. Go to your first post
2. Edit your first post
3. Click "Go Advanced"
4. In the dropdown next to the title, select "RESOLVED"