Hello,
I am trying to include functions and data structures described in one .js file into another.
The HTML file includes the .js file like so:
Code:
<script language="javascript" type="text/javascript" src="include.js"></script>
And I tried to include the second .js file from within "include.js" like so:
Code:
document.write("<script language=\"javascript\" type=\"text/javascript\" src=\"include1.js\"></script>");
But I get an error whenever the page executes. It seems that the text in "include1.js" is parsed by the browser, but it can not be referenced from "include.js" until the page has finished loading.
Help would be much appreciated.
|