View Full Version : problem loading javascript files

26 Mar 2012, 2:40 AM
Hello Team,

<script type="text/javascript" id="extlocale"></script>
<script type="text/javascript" src="js/login.js"></script>
<script type="text/javascript" src="js/personsearch.js"></script>

The first script loads a javascript file using the id. The file is successfully loaded and can be used for localization in "login.js". But the same file is not accessible through "personsearch.js".

If i add "<script type="text/javascript" id="extlocale"></script>" again before "personsearch.js", it works.

What is the issue that one file cannot be loaded for all the other js files?

Any help is appreciated.

26 Mar 2012, 8:03 AM
What is in extlocale.js?

26 Mar 2012, 6:56 PM
extlocale is an id which loads app.js based on the browser language. App.js is loaded successfully for login.js but its not accessible for the next js file.
however, if i insert app.js right before personsearch.js, it wil be accessible.

Is it a scope problem?? Does sencha file access only the previous file and its variables??