Results 1 to 3 of 3

Thread: AnyLink JS Drop Down Menu - adds extra folder to links

  1. #1
    Join Date
    Dec 2004
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default AnyLink JS Drop Down Menu - adds extra folder to links

    1) Script Title: AnyLink JS Drop Down Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    3) Describe problem: I was able to get the Drop Down menu to work, but now the links within each menu variable have an extra folder that I didn't put there. So the links go to the wrong spot when published. Has anyone else had this problem? See http://www.cdlbiz.com/form/company/company3.html.

    For example, in my JS menu, these are the attributes:
    var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''}
    anylinkmenu1.items=[
    ["About Us", "company/company.html"],
    ["Management Team", "company/team.html"],
    ["Overview Presentation", "images/FormationOverview_908.ppt"]
    ]

    Yet if you mouse over the corresponding link when it's published, the "About Us" link goes to www.cdlbiz.com/form/company/company/company.html instead of www.cdlbiz.com/form/company/company.html like its supposed to.

    I realized something else. When the original file is not in a subfolder, the links are fine. But when I move the file to a subfolder, it adds an folder to the link. See http://www.cdlbiz.com/form/test.html. The links are how they are supposed to be under the company folder.

    Any ideas? I use FrontPage.

    Thanks!!
    Last edited by cdlong; 02-13-2009 at 03:25 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Looking at your menu contents file, the problem is simply the way you've specified the path to the target URL, in this case:

    Code:
    ["About Us", "company/company.html"],
    Since you've specified a relative URL in the above, it becomes relative/ added to the page the menu is currently being shown at, namely, http://www.cdlbiz.com/form/company/company3.html The two merged creates the double company/ directory you see.

    The solution is just to specify absolute URLs inside your menu contents for all links.
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    cdlong (02-13-2009)

  4. #3
    Join Date
    Dec 2004
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    It worked. Thanks so much for your help!!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •