Entry
How can I include another .js file in a javascript file?
May 22nd, 2000 15:27
Chris Durkin, Martin Honnen, oops - deleted by mistake - sources are Romain Xie, Matthew Glidden
You can insert a file by using "document.write" with src line of the
file you wish to include. For example, if you want to include a list of
variables with a list of functions and use separate files, you could
include this line in the functions file:
var baseHref = "http://yoursite/";
document.write('<script language="javascript" src="' + baseHref
+ 'variables.js"></script>');