Results 1 to 7 of 7

Thread: Top Navigational Bar III

  1. #1
    Join Date
    Jun 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool Top Navigational Bar III

    Top Navigational Bar III (v3.5.1)
    http://dynamicdrive.com/dynamicindex1/topmen3/index.htm

    I'm trying to have the files for the navigation bar in a different directory than the page that they are being displayed on, but it doesn't seem to be working...
    http://www.kamisaibou.com/misc/webrings.html
    I would really not like to have to have the javascript files in every directory, because I have so many of them...

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I don't see a menu on your page but, using absolute paths in the configuration files as well as in the head of the document(s) you are linking the script to usually works.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok, I'll try that. ^.^ And that's the problem I was having anyways: I put in the code that should make the menu appear, but for some reason it didn't show up unless the .html file and the .js files were in the same directory...
    Last edited by kamisaibou; 08-24-2005 at 02:55 PM.

  4. #4
    Join Date
    Jun 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ...it's still not working.

  5. #5
    Join Date
    Feb 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am having exact same trouble I have all the files in my root dir and it works fine i like to have in javascript folder with all my other jscript to keep it tidy also i have certain modules in other dirs and i don t really want all the files dotted about

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by EKsparky View Post
    I am having exact same trouble I have all the files in my root dir and it works fine i like to have in javascript folder with all my other jscript to keep it tidy also i have certain modules in other dirs and i don t really want all the files dotted about
    Please post a link to the page on your site that contains the problematic code so we can check it out.


    As I said before - back in 2005, this is a pretty old thread - once you move the script out of the directory of the page that is using it, the easiest way to resolve path issues is to use the absolute path wherever a path is called for in the script file(s). This works with all external scripts.

    There is a spot in custom.js:

    Code:
    var baseHREF = "";	// base path to .js files for the script (ie: resources/)
    put the path, preferably the absolute path to the scripts folder here and it should be fine.
    Last edited by jscheuer1; 02-08-2008 at 04:24 PM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Feb 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for that i missed Var baseHREF option
    working fine now all nice and tidy

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
  •