View Full Version : Include external js file

Digital God
2 Jul 2007, 9:51 PM
Hi all!
is it possible to load external js file?

2 Jul 2007, 11:54 PM
Just create a script element, set the src, and add it to the document header. Of course that is asynchronous. You won't know when that script is loaded and parsed....

3 Jul 2007, 5:16 AM
<script type="text/javascript" src="whatever.js"></script>

5 Jul 2007, 7:50 AM
My team is updating our web application. We needed the ability to load scripts asyncronously and to know when they were loaded. We found the following link very helpful: http://design-noir.de/webdev/JS/loadScript/. We haven't adapted it for Ext yet, but we did adapt it with Prototype, and it worked excellent.