What is Path in of .JS files if .JS is in a subfolder

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
alanrshultz
Beginner
Beginner
Posts: 7
Joined: Thu Dec 08, 2005 7:45 pm

What is Path in of .JS files if .JS is in a subfolder

Post by alanrshultz »

what would the correct paths (see bellow the *** ) if your index.html was in your root dir... but the .js files were in a sub folder called /scritps

*****************************************

<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="menu_data.js"></script>
<script type="text/javascript" src="dragdrop.js"></script
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

If the files are in the root directory it would be just the file name. If they are in a folder in the root directory it would be the folder name / file name, if they are in a folder in the folder in the root directory it would be the folder name / folder in the folder name / file name, and so on.

Ruth
alanrshultz
Beginner
Beginner
Posts: 7
Joined: Thu Dec 08, 2005 7:45 pm

Dir Path

Post by alanrshultz »

Okay.. well what if the HTML is in located at wwwroot/thisfolder/index.html, and the .js files are in the wwwroot/js folder...

what should this say?

<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="menu_data.js"></script>
<script type="text/javascript" src="dragdrop.js"></script


Thank You
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

If they are in a folder in the root directory it would be the folder name / file name, so given the name you have it would be js/milonic_src.js and the same for the other file in the js folder.


Ruth
Post Reply