Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i want to know that how can i include js file i.e file1.js in another js file i.e. file2.js.
Thank u.
Posted

1 solution

You would need a function that would load/add the script element dynamically. Check the link for 4 options on how to do it:
http://ntt.cc/2008/02/10/4-ways-to-dynamically-load-external-javascriptwith-source.html[^]

Good luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900