Menu Items URLs

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
biographie
Advanced
Advanced
Posts: 17
Joined: Thu Oct 17, 2002 7:41 am

Menu Items URLs

Post by biographie »

I just updated to the latest version, and I seem to be experiencing a problem. When I am checking my website over on my local machine, and I pick a menu item I get a dialog box saying that the file does not exsist. If I remember correctly, before we had a variable we could set to the local working directory to keep the links working while testing before upload. Let me layout what I currently have.

Using a Mac with OS X 10.3.5 with the latest version of Safari

website under directory my_website:

index.html
->general
->jscripts
->images
...

the menu files (including the menu_data.js) are under the jscripts directory:

jscripts/menu/*.js

I want to make a menu item with a url to a page in the general directory:

url=/general/equipment.html

When I test the page, and select the menu item, the dialog says:

File does not exsist
"File///general/equipment.html"

If I go and back out the path based on where the menu_data.js file is:

url=../../general/equipment.html

I still get a dialog, but this time it says:

File does not exsist
"File/scott/Volumes/Beta/scott.korey.name/general/equipment.html"

It seems to forget the my_website directory between the .name directory and the general directory.

I know this is something probably very simple, but I can't figure out what I am doing wrong. Things worked just fine in pervious versions.
udi
Beginner
Beginner
Posts: 7
Joined: Mon Aug 23, 2004 8:11 pm

Post by udi »

I haven't double checked this, but I think if you just get rid of the leading forward slash you'll be fine.

Change: url=/general/equipment.html
To: url=general/equipment.html

Hope that helps
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Does the same setup work OK on your server?

Unless your local setup exactly matches that of your server (assuming the server setup works), you will get this type of error. Something has apparently changed locally (I doubt the menu itself would cause this).

As for removing the leading / - I wouldn't. Stick with server-relative addressing (which ../../ is not).
John
biographie
Advanced
Advanced
Posts: 17
Joined: Thu Oct 17, 2002 7:41 am

thanks!

Post by biographie »

OK, well I got ahead of myself. You are both right. Taking out the / made everything work again when I was testing locally. I don't have my Mac setup exactly like my ISP. I just try to test the pages from GoLive. But everything works just fine once I upload it to the server with the / in place. I guess I will just keep two copies of the menu_data file (one with /; one without).

I do have another question about the menu, but I will start it in another thread.
Post Reply