PDA

View Full Version : Top Navigational Bar III



kamisaibou
08-23-2005, 04:40 PM
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...

jscheuer1
08-23-2005, 04:56 PM
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.

kamisaibou
08-24-2005, 02:50 PM
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... :confused:

kamisaibou
08-24-2005, 02:56 PM
...it's still not working. :confused: :confused: :(

EKsparky
02-08-2008, 02:52 PM
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

jscheuer1
02-08-2008, 04:18 PM
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:


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.

EKsparky
02-08-2008, 05:17 PM
Thanks for that i missed Var baseHREF option :o
working fine now all nice and tidy :D