Board Logo

Menues dont show on pages in folders
ricW - 10/16/2007 at 03:40 PM

I have had to move several pages on our site into sub-folders. The links updated properly but the menues do not show on any of the pages.

e.g. -
In original location, javascript in the meta tag reads:
src="menu_files/menu_items.js"

In new folder, it reads
src="../menu_files/menu_items.js"
reflecting a move to the new folder

Is there some other part of the javascript that must be changed to accommodate the moved pages.

Rick W.


tigra - 10/16/2007 at 05:04 PM

check path variable inside menu.js
If you use the menu from different levels of the file system hierarchy then use absolute path there.


ricW - 10/16/2007 at 06:30 PM

All pages were originally created in one folder. I have had to distribute most, but not all, of them to sub folders one level down. It was not clear from your answer how I would use an absolute path. Which path in what file?
The paths in the head of each page were automatically changed by Dreamweaver and appear to be correct. This includes the path to menu.js, but not the path (var TMenu_path_to_files='menu_files/') within menu.js.

If you make a copy of any page and move it to any subfolder you will likely see that the menu/s do not show up when you display the moved page in a browser.

Rick W.


tigra - 10/23/2007 at 07:40 PM

All pages share the same copy of menu.js thus the variable inside menu.js (TMenu_path_to_files) must contain correct path regardless of where menu.js is referenced from. Absolute path works fine for that i.e:
var TMenu_path_to_files='http://www.yourdomain.com/javascripts/menu_files/
var TMenu_path_to_files='/javascripts/menu_files/


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/