If I am not mistaken, Javascript Resource is nothing but your * .js files, right? That way you can include any number of js on your tagged page <script>. eg.
<script type="text/javascript" src="MyDomain/js/abc.js"></script>
<script type="text/javascript" src="MyDomain/js/xyz.js"></script>
In addition, in one js file, you can import another js file by calling the following function:
function IncludeJavaScript(jsFile)
{
document.write('<script type="text/javascript" src="'
+ jsFile + '"></scr' + 'ipt>');
}
EDIT:
Or another way to write the same function:
function includeJS( jsPath )
{
var js = document.createElement("script");
js.setAttribute("type", "text/javascript");
js.setAttribute("src", jsPath);
document.getElementsByTagName("head")[0].appendChild(js);
};
Call these functions inside the js file.
source
share