hmmm - relative paths don't seem to work !

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
jellyfrog
Beginner
Beginner
Posts: 1
Joined: Fri Oct 17, 2003 11:31 am

hmmm - relative paths don't seem to work !

Post by jellyfrog »

In menu_data.js I have the following line;

aI("text=About Us;url=about_us.htm/;");

which doesn't seem to work. The correct url opens in the browser window but nothin' appears until I hit the refresh button.

If I change this to

aI("text=About Us;url=http://www.mywebsite.com/;");

or

aI("text=About Us;url=http://www.mywebsite.com/about_us.htm/;");

then it works fine. Any reason ? or any fixes ?
User avatar
bobwill
Mega Advanced
Mega Advanced
Posts: 229
Joined: Tue Oct 01, 2002 3:03 pm
Location: Kansas
Contact:

Post by bobwill »

Try adding a "/" in front of you "htm" file. Leave off the ending "/"

aI("text=About Us;url=/about_us.htm;");

If you have sub-directories that you want to access then you would use the following format:

aI("text=About Us;url=/sub-dir/about_us.htm;");
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Bob is correct.

Rule of Thumb...

When a directory is the last item in a URL, use a closing /.

When a file if the last item in a URL, never use a closing /.
John
Post Reply