View Full Version : Calling up an external .js file from within a .js file.
How do I call up another .js from within a .js file? Let's say I have test.js and test2.js. I want to access some variables and functions from test2.js.
x_goose_x
08-20-2002, 02:39 PM
Try:
document.write('<scr'+'ipt src="test2.js"></scr'+'ipt>');
beetle
08-20-2002, 06:13 PM
The easiest way is just include test2.js in the HTML source BEFORE test.js
<script src="test2.js"></script>
<script src="test.js"></script>
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.