: : : : Can anyone help me out in including a js file in another js file. I have a js file that is already included in my whole site, now i would like to add 1 more js file into my site, what could be the solution?
: : : :
: : : All external files, which are included in the same html file using the <script> tag, can make use of one and another. Thus:
: : :
: : : <script src="one.js"></script>
: : : <script src="two.js"></script>
: : :
: : : functions in two.js can call functions defined in one.js, and vice versa.
: : :
: :
: : ThanX but i wana include "two.js" in "one.js", coz i have many files in my website, i cant edit all these, so i think the better way will be to include it in "one.js". Hope i'll get what i want!
: :
: :
: As far as I know, that's impossible. But perhaps you can find more info on www.w3schools.com.
:
He's right; It's not possile for JavaScript to include another JS file like ASP can. You will have to have a search and replace for your pages in NotePad or something similar...
Search for: <script src="one.js"></script>
Replace with: <script src="one.js"></script><script src="two.js"></script>
Sorry,
-( Aaron )-
"Alcohol aint the answer, but atleast you forget the question"