PDA

View Full Version : Path Error in ddlevelsmenu.js



mindretreat
02-24-2009, 08:25 PM
1) Script Title: All Levels Navigational Menu (v2.1)
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamici...menu/index.htm
3) Describe problem:


Hi,

The pages I created in the root folder has no problems in accessing and showing the arrow graphics files in the folder ddlevelfiles.

However, when I created a page in a folder in the root directory, the arrow gifs no longer show up. It can show up only when I copy the arrow graphics within that folder itself.

I tried to add ../ in front of the path in the file ddlevelsmenu.js, but it does not work.
arrowpointers:{
downarrow: ["../ddlevelsfiles/arrow-down.gif", 11,7], //[path_to_down_arrow, arrowwidth, arrowheight]

Can someone please help me how to path correctly? Thank You.

Original code in ddlevelsmenu.js file
arrowpointers:{
downarrow: ["ddlevelsfiles/arrow-down.gif", 11,7], //[path_to_down_arrow, arrowwidth, arrowheight]
rightarrow: ["ddlevelsfiles/arrow-right.gif", 12,12], //[path_to_right_arrow, arrowwidth, arrowheight]
showarrow: {toplevel: false, sublevel: true} //Show arrow images on top level items and sub level items, respectively?


I appreciate assistance regarding this problem.

Thank You very much in advance.

ddadmin
02-24-2009, 11:06 PM
If pages that use the menu are scattered across various directories on your site, you should just use absolute URLs inside the .js file to get to the arrow images:


downarrow: ["http://mysite.com/ddlevelsfiles/arrow-down.gif", 11,7], //[path_to_down_arrow, arrowwidth, arrowheight]
rightarrow: ["http://mysite.com/ddlevelsfiles/arrow-right.gif", 12,12], //[path_to_right_arrow, arrowwidth, arrowheight]