Redundant question but!!!!

liunx

Guest
I have a script that is called by about 650 html files that are in about 150 different folders at various levels below the root. <br />
Is there anything I can do so that all of the 650 html pages were the same as far as the include js call and that the js script be in the root only - one copy of js script.<br />
<br />
<script language="JavaScript" src=http://www.htmlforums.com/archive/index.php/"_______/myscript.js"><br />
</script><br />
<br />
I know that ../ is one level, ../../ is two is there a root/? Something like it?<br />
<br />
Can I use CSS? This needs to run from CD as well as server so Perl/php/etc. are not available.<br />
<br />
Sorry for being redundant to previous messages.<br />
<br />
Thanks,<br />
RON C<!--content-->You can try using the full path the file instead of using ../../<br />
<br />
<script language="JavaScript" src=http://www.htmlforums.com/archive/index.php/"full/path/to/your/myscript.js"> <br />
</script><!--content-->This is what I did. It works for every directory from top to bottom. Kind of redundant!!!!! Just like my question.<br />
<br />
<br />
<script language="JavaScript" src=http://www.htmlforums.com/archive/index.php/"../myscript.js"></script> <br />
<script language="JavaScript" src=http://www.htmlforums.com/archive/index.php/"../../myscript.js"></script><br />
<script language="JavaScript" src=http://www.htmlforums.com/archive/index.php/"../../../myscript.js"></script><br />
<script language="JavaScript" src=http://www.htmlforums.com/archive/index.php/"../../../../myscript.js"></script><br />
<script language="JavaScript" src=http://www.htmlforums.com/archive/index.php/"../../../../../myscript.js"></script><br />
<script language="JavaScript" src=http://www.htmlforums.com/archive/index.php/"../../../../../../myscript.js"></script><br />
<br />
<br />
Thanks for the help.<br />
RON C<!--content-->ron,<br />
<br />
I'll try to get you some info from the webserver on down to the page level.<br />
<br />
Lets assume our website is called test.com and our webserver understands that when we type /test/ that we are requesting pages from the 'test' directory. You may need to map this directory with the webserver if it is not under the root web publishing directory. If you were using microsoft PWS/ IIS the root directory is called inetpub.... so any subdirectories of inetpub do not need to be mapped.<br />
<br />
SO, since the server knows what /test/ means, we can add a directory below it called scripts. Put all your linked javascripts in there. <br />
<br />
Then on the page level (no matter WHERE the page is, or how many directories down it is) you would call it by:<br />
<br />
<script language=javascript src=http://www.htmlforums.com/archive/index.php/"/test/scripts/linkedFile.js"></script><br />
<br />
its the same for css.<!--content-->I need this to work on a server as well as from CD.<br />
<br />
The client will be changing content within the folders and in a special js script that stores info about the content. She will make business card CDs and send them to special clients with the normal BS for sales.<br />
<br />
You guys are sure helpful. <br />
<br />
I'll send a sample CD to one of you when it is ready if you're interested and that someone e-mails their address. The javascript is kind of neat in that it is a dynamic photo album with comments for each image. The images are alo scaled to fit the useable screen. I have a slide show to fit in this week end and it is dynamic also. Just calls the js stuff.<br />
<br />
Thanks,<br />
RON C<!--content-->
 
Back
Top