Relative Path Problem

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
jlynn
Beginner
Beginner
Posts: 1
Joined: Fri Nov 04, 2005 8:37 pm
Location: Celebration, FL
Contact:

Relative Path Problem

Post by jlynn »

Hi,

A basic newbie question:

If I have milonic_src.js and menu_data.js installed on the main directory of my webserver. What is the correct syntax for 'relative path' when I need to point to these files?

In other words.... my javascript works only if I build pages that have milonic_src.js and menu_data.js in the same directory.

I have exhausted my knowledge on how to point to these files if I have a website that is in a different directory. Please help!
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi John,

Try this post viewtopic.php?t=4106

If all else fails, you can use full paths, which I have done a lot. Usually if the files are in your root directory, all you need is the file name, with nothing else there it should assume the root directory.

Code: Select all

<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
With this call, it should just look in the root directory for the file.

Ruth
Post Reply