Results 1 to 10 of 10

Thread: AnyLink JS Drop Down Menu v2.3

  1. #1
    Join Date
    Jan 2012
    Posts
    20
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default AnyLink JS Drop Down Menu v2.3

    1) AnyLink JS Drop Down Menu v2.3 2) http://www.dynamicdrive.com/dynamici...pmenuindex.htm Hi, I'm using the drop down menu script, above, for the first time and want to incorporate a menu within a template so as to replicate the facility across all related website pages. It works fine with absolute paths, but not with relative paths - prefixed ../ Can anybody help? Andrew

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,011
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    Can you explain what exactly isnt working with relative paths - relatives paths where? In the js or the anchor links in your HTML? Are you sure the relative page location is correct and pages are uploaded?

    Lots of things could be the issue so please post the link to your page as it will be easier to pinpoint the problem.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. #3
    Join Date
    Jan 2012
    Posts
    20
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Beverleyh View Post
    Can you explain what exactly isnt working with relative paths - relatives paths where? In the js or the anchor links in your HTML? Are you sure the relative page location is correct and pages are uploaded?

    Lots of things could be the issue so please post the link to your page as it will be easier to pinpoint the problem.
    Hi Beverley,
    Thanks for the speedy response.
    The relative paths are in the js, as follows:

    Code:
    var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
    anylinkmenu1.items=[
    	["Ecology and Conservation", "../services/ecology_and_cnservation/ecology_and_cons_services.html"],
    	["Green Infrastructure", "../services/green_infrastructure/green_infrastructure.html"],
    	["Recreation and Open Spaces", "../services/recreation_and_open_spaces/recreation_and_open_spaces.html"] //no comma following last entry!
    ]
    All the downloaded scripts are in the root directory.
    The site has not been loaded yet, as it's still in development.
    I'm previewing the pages in IE - there's a facility to allow scripts to run.

    (Oddly, the links occasionally work ok, but usually return the message: Oops, the page you are looking for could not be found).

    The anchor link code on the page is largely as it started:
    HTML Code:
    <p><a href="http://www.dynamicdrive.com" class="menuanchorclass" rel="anylinkmenu1">Consultancy Services</a></p>
    (I assume that I should change the reference to dynamicdrive to my own website url, when the site is loaded).

    Thanks again,
    Andrew
    Last edited by keyboard; 11-25-2012 at 08:44 PM. Reason: Format: Code Tags [code][/code], Html Tags [html][/html]

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,011
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    Ok, so what exactly isn't working? What happens when you click the main anchor link? What happens when you click the drop down links? Does a web page open but just not display the content? Have you tried setting up the script on a blank page? Does that work as expected? Are there other scripts on the page that could be interfering?

    Please try to be as specific as possible and also upload your pages to provide a working link - if you don't want to give us a final link address, please provide page links from a temporary test location.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  5. #5
    Join Date
    Jan 2012
    Posts
    20
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Beverleyh View Post
    Ok, so what exactly isn't working? What happens when you click the main anchor link? What happens when you click the drop down links? Does a web page open but just not display the content? Have you tried setting up the script on a blank page? Does that work as expected? Are there other scripts on the page that could be interfering? Please try to be as specific as possible and also upload your pages to provide a working link - if you don't want to give us a final link address, please provide page links from a temporary test location.
    Hi Beverley,

    I hope that the following makes sense.

    When the main anchor link is clicked, the Dynamic Dive home page is displayed - presumably because I've not changed the anchor link code.

    I've just done a little more testing and realise that links on pages immediatly below the root directory work ok, but those on pages further down the structure do not work, nor do those on the home page. Those that do work are on pages at exactly the same level as the template page where the anchor link was specified - a coincidence?

    The structure is:
    Site
    About us - folder and page
    Contact us - folder and page
    Services - folder
    Ecology and Conservation - folder
    Assessment - folder and page
    Biodiversity - folder and page
    Template - folder and page
    Etc

    So the links work ok on the About us and Contact us pages, but not on others.

    Those not working return a page with a message saying 'Oops, the page you are looking for could not be found'.

    There are no other srcipts on the page.

    Sorry, I don't currently have facilities to load the pages.

    Hope this helps.
    Andrew

  6. #6
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,011
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    I think what you're describing is that relative links dont work on a template page because there not always relative once you move around sub folders? They break. Unfortunately there's no easy work around for that.

    You can format an absolute link like this: "/about/page.html" too.

    The slash at the start tells the script to always start from the root, without actually specifying the domain (without the http://mywebsite.com part.)

    I don't imagine this will work on a local computer though - you'll need to upload it to see it working. Alternatively you can run a server environment on your computer for testing. Try http://www.server2go-web.de/
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  7. #7
    Join Date
    Jan 2012
    Posts
    20
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Thanks Beverley, that makes sense.
    Presumably there is no disadvantage in using full, absolute addresses - is there?
    Andrew

  8. #8
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,011
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    Only in the sense that they lose portability (as you've found out) and they take a bit more effort to type. They otherwise function just the same.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  9. The Following User Says Thank You to Beverleyh For This Useful Post:

    andywalmsley (11-25-2012)

  10. #9
    Join Date
    Jan 2012
    Posts
    20
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Beverleyh View Post
    Only in the sense that they lose portability (as you've found out) and they take a bit more effort to type. They otherwise function just the same.
    Thanks again Beverley, for your help.
    Andrew

  11. #10
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,011
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    Happy to help
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

Similar Threads

  1. Anylink drop down menu - Demo #3 (sub menus drop to the right of anchor):
    By pjdcreative in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 06-17-2010, 02:54 AM
  2. AnyLink JS Drop Down Menu-drop down positioning problem g
    By BobMinkin in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 03-27-2009, 02:47 PM
  3. AnyLink Drop Down Menu/Anylink Css
    By wendyscountrycloset in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 05-04-2007, 04:07 PM
  4. AnyLink Drop Down Menu - force drop down
    By ddf_al in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 12-14-2005, 01:16 PM
  5. Making AnyLink Drop Down Menu DROP UP
    By jtarabay in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 11-30-2005, 01: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
  •