Results 1 to 8 of 8

Thread: Can't get new AnyLink Drop Down script to work. Help?

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

    Default Can't get new AnyLink Drop Down script to work. Help?

    1) Script Title: AnyLink JS Drop Down Menu

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

    3) Describe problem: I can't seem to get the drop down links to work. I am a novice at web development but I have been able to get the old dynamic drive anylink code to work. I can't get it to work this time.

    I tried posting the code as its described without modification, but the links don't drop down. What am I doing wrong?

    http://cdlbiz.com/form/company/company3.html

    I saved the three files within the website folder:
    * anylinkmenu.js
    * menucontents.js
    * anylinkmenu.css

    Pasted the code in the head section:
    <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/dynamici...pmenuindex.htm for full source code
    ***********************************************/

    </script>

    And then established the anchor link but it doesn't drop down. Any thoughts?

    Thank you.

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

    Default

    Are you still having problems? In FF3 and IE7 I see the drop downs working.
    DD Admin

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

    Default

    Thanks for your inquiry. I did figure out how to get the drop down to work. But now it seems that its adding an extra folder to all of my links. For example, instead of linking to company/company.html, the page tries to link to company/company/company.html. When I look at the code, my links are accurate. Any thoughts?

    By the way, I did the drop downs on the home page the "old way" and would prefer the new way that links to menucontent.js. I'll update the home page once I get everything working right in my test page (www.cdlbiz.com/form/company/company3.html).

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

    Default

    The script doesn't modify the href attribute of the anchor links in anyway. What browser does the problem occur in? Right now looking at your page, the anchor link "Solutions" links to http://cdlbiz.com/form/company/company3.html
    DD Admin

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

    Default

    The problem happens in IE and FF.

    I don't know why the extra folder is appearing in the href attributes. This is the code for those links:

    <a href="#" class="menuanchorclass" rel="anylinkmenu1" style="text-decoration: none">
    <font color="#FFFFFF">COMPANY</font></a></font></td>

    <a href="#" class="menuanchorclass" rel="anylinkmenu2" style="text-decoration: none">
    <font color="#FFFFFF">SOLUTIONS</font></a></font></font></td>


    This is my menu content:

    var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''}
    anylinkmenu1.items=[
    ["About Us", "company/company.html"],
    ["Management Team", "company/team.html"],
    ["Overview Presentation", "images/FormationOverview_908.ppt"]
    ]

    var anylinkmenu2={divclass:'anylinkmenu', inlinestyle:'', linktarget:''}
    anylinkmenu2.items=[
    ["Connectivity", "products/connect.html/"],
    ["Record and Replay", "products/record.html/"],
    ["Rugged Data Storage", "products/ruggedstorage.html"],
    ["Ruggedized Computing", "products/computing.html"],
    ["Configured Solutions", "products/configured.html"]
    //
    ]
    etc.
    Last edited by cdlong; 02-13-2009 at 01:44 AM.

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

    Default

    OK - now I really messed it up. For some reason the drop downs aren't working.

    I think I'm calling it a night.

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

    Default

    The menus still drop down for me at the moment. Regarding the link issue, if you want an anchor link to actually be hyperlinked, you need to specify that inside its A element, for example:

    Code:
    <a href="http://cdlbiz.com/form/company/company3.html" class="menuanchorclass" rel="anylinkmenu2" style="text-decoration: none">
        <font color="#FFFFFF">SOLUTIONS</font></a>
    DD Admin

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

    Default

    I figured out what I changed that made the drop downs stop working. About the anchor links. I do know that if I want an anchor link to be hyperlinked I need to specify that inside its A element. Just can't figure out why the hyperlinks have the extra "company" folder after I publish it when it's not in the code anywhere.

    I'm going to start a new thread about this new problem. Maybe someone else has experienced the same thing. Thanks.
    Last edited by cdlong; 02-13-2009 at 03:10 PM.

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
  •