1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    49
    Vote Rating
    0
    Digital God is on a distinguished road

      0  

    Default Include external js file

    Include external js file


    Hi all!
    is it possible to load external js file?

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,502
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    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. #3
    Ext User para's Avatar
    Join Date
    Apr 2007
    Location
    Redmond, WA
    Posts
    918
    Vote Rating
    -2
    para has a little shameless behaviour in the past

      0  

    Default


    Code:
    	<script type="text/javascript" src="whatever.js"></script>

  4. #4
    Sencha User loeppky's Avatar
    Join Date
    May 2007
    Location
    Seattle, WA
    Posts
    230
    Vote Rating
    0
    loeppky is on a distinguished road

      0  

    Default


    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.

Thread Participants: 3