PDA

View Full Version : anylink dropdown menu



hooloovoo
11-03-2004, 08:35 PM
AnyLink Drop Down Menu (http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm)

Hi, I'm having a problem with the above script. I am using in a template, so it is used in several pages. The problem is that the links I provided for the script do not work because of file folders. Example:

page 1 is not in a folder
page 2 is in folder A
page 3 is in folder B

If you are on page 1 and want to go to either page 2 or 3 the links work fine.
If you are on page 2 and want to go to page 1 or 3, the links do not work fine. The script tries to add the link onto folder A so instead of getting this for page 3: .../folder B/page3.html
you get this for page three: .../folder A/folder B/page3.html

It doesn't matter if I put in the entire address or not, it still adds in the name of the folder you are currently in. I hope that makes sense.
Does anyone know how to fix this?

ddadmin
11-04-2004, 08:20 PM
JavaScript has a strange way of interprutting relative paths depending on the browser you're using. Usually in these cases, it's easiest just to use the entire, absolute URLs to the destination instead of local paths. Also, I noticed your paths contain spaces (ie: folder B)- this can be problematic.

Not sure what to tell you other than try using absolute URLs (http://mysite.com/folderB/page3.html), and if possible, rename the folders so no spaces exist.