[Javascript] Including Files

Tim Makins spindrift at oceanfree.net
Sat Nov 22 09:07:41 CST 2003


<SCRIPT SRC="my_page.js"></SCRIPT>

The above line lets me include an external script in my page.

I have two questions about this...

A/ If I had three folders: 'folder_A, folder_B, folder_C' each of which
contain the file 'my_page.js', is there any way a script could specify which
one of those folders to load 'my_page.js' from?

B/ Similarly, if I had 1 folder, and in it were 3 files: 'my_page1.js,
my_page2.js, my_page3.js', is there any way a script could specify which one
of those files to load?

Tim in Ireland.

PS in case someone (there usually is someone) asks why I want to do this,
the answer is that I have a large amount of data, and rather than trying to
load it all in one go, it makes more sense to split it up and get the data
as required. This is for a local display on a static machine reading from CD
or harddrive, so no servers, ASP, PHP, databases, etc. are involved.







More information about the Javascript mailing list