//http://www.sencha.com/forum/showthread.php?188318-Ext.Loader.loadScriptFile-wrong-URL
Ext.Loader.loadScriptFile("/a.js", function() {
console.log('hello loadScriptFile callback'); }, undefined, true
);

//you can load script from local

//and also, you can load script from remote server

//for example,you can load a jquery lib from jquery CDN

Ext.Loader.loadScriptFile("http://code.jquery.com/jquery-2.0.3.js", function() {
console.log('hello loadScriptFile callback'); }, undefined, true
);
//you now can use jquery functions
console.log($('body')[0].innerHTML)
//above will error,you can't use $ at this place this moment, because the Loader loading files async,your code is not loaded just now
// you can try
//http://www.sencha.com/forum/showthread.php?188318-Ext.Loader.loadScriptFile-wrong-URL
Ext.Loader.loadScriptFile("http://code.jquery.com/jquery-2.0.3.js", function() {
console.log('hello loadScriptFile callback');
//once your script load successfully, you can use your functions from the new imported lib
console.log($('body')[0].innerHTML);
}, undefined, true
);

Load a script file in sencha, supports both asynchronous and synchronous approaches的更多相关文章

  1. 网页提示[Not allowed to load local resource: file://XXXX]错误

    网页通过http 访问时, 点击打开文件的link.在Chrome 中会报 Not allowed to load local resource: file// XXXX 的错误 <!--Add ...

  2. Failed to issue method call: Unit httpd.service failed to load: No such file or directory.

    centos7修改httpd.service后运行systemctl restart httpd.service提示 Failed to issue method call: Unit httpd.s ...

  3. 报错:Unable to load configuration. - action - file:/E:/apache-tomcat-8.0.37/webapps/20161102-struts2-3/WEB-INF/classes/struts.xml:11:73

    第一种报错: 严重: Exception starting filter struts2Unable to load configuration. - action - file:/E:/apache ...

  4. 遇到一个奇葩的问题,could not load the assembly file XXX downloaded from the Web

    在我这编译好好滴,发给客户那边居然不通过,报could not load the assembly file:///xxx.dll, 查阅了一些文档后,发现原来是文件的安全问题,是由于我把文件压缩打包 ...

  5. 出现错误:Unable to load configuration. - action - file:/E:/Java/Tomcat7.0/apache-tomcat-7.0.68-windows-x64/apache-tomcat-7.0.68/webapps/SSH2Integrate/WEB-INF/classes/struts.xml:8:43

    严重: Exception starting filter struts2 Unable to load configuration. - action - file:/E:/Java/Tomcat7 ...

  6. Failed to issue method call: Unit mysql.service failed to load: No such file or directory解决的方式

    Failed to issue method call: Unit mysql.service failed to load: No such file or directory解决的方式 作者:ch ...

  7. Unable to load configuration. - action - file:/F:/apache-tomcat-8.0.30/webapps/test1Struts2/WEB-INF/classes/struts.xml:11:71

    Unable to load configuration. - action - file:/F:/apache-tomcat-8.0.30/webapps/test1Struts2/WEB-INF/ ...

  8. options.html:1 Refused to load the script 'xxxx' because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:".

    /********************************************************************************* * options.html:1 ...

  9. Caused by: Unable to load configuration. - action - file:/C:/apache-tomcat-7.0.70/webapps/Structs/WEB-INF/classes/struts.xml:7:72 at com.opensymphony.xwork2.config.ConfigurationManager.getConfigurati

    Unable to load configuration. - action - file:/C:/apache-tomcat-7.0.70/webapps/Structs/WEB-INF/class ...

随机推荐

  1. Android开发环境搭建完全图解(转)

    本文介绍从0开始,在Linux系统下,搭建一个Android开发环境的方法. 如果你是<Learning Android>这本书的读者,你也可以参考这篇文章,因为这篇文章是以书中的安装方法 ...

  2. 어느 도시 보유 하 면 사랑 이다(事態が発生すれば、ある都市の恋はしません)【Si les villes un amour】{If have love in a city}

    如果在北京拥有爱情 半夜在簋街喝啤酒 吃小龙虾 在后海的苦情歌声里 搂着你数那四合院的瓦片 如果在上海拥有爱情 去外滩手挽手 吹吹风 坐一下午 去城隍庙尝试各种小吃 嘲笑你嘴角残余的糯米糕 如果在杭州 ...

  3. Oracle恢复已删除数据

    Oracle恢复已删除的数据,主要有两种方法:SCN和时间戳. 一.通过SCN恢复删除且已提交的数据 1.获得当前数据库的scn号 select current_scn from v$database ...

  4. scala学习笔记:理解stream和view

    先来个正常的: scala> (0 to 5).map((x:Int)=>{println(x);x*2}).foreach(println) 0 1 2 3 4 5 0 2 4 6 8 ...

  5. 自己动手写一个简单的(IIS)小型服务器

    因为第一次在博客园发表随笔,不太会用,这个笔记是我之前在印象笔记中写好的,然后直接copy过来,有兴趣自己做一个IIS服务器的小伙伴们可以参照下面的流程做一次,也可以叫我要源代码,不过要做完,我觉得花 ...

  6. Microsoft SQL Server 获得本地帮助方法

    微软的自带的帮助文档不管是对于开发人员还是DBA都是相当的重要.一般在有网络的状况下可以直接访问 http://msdn.microsoft.com/query/dev10.query?appId=D ...

  7. items 与iteritems

    dict的items函数返回的是键值对的元组的列表,而iteritems使用的是键值对的generator. items当使用时会调用整个列表 iteritems当使用时只会调用值. >> ...

  8. OC3_字典

    // // main.m // OC3_字典 // // Created by zhangxueming on 15/6/12. // Copyright (c) 2015年 zhangxueming ...

  9. JSTL 入门

    JSTL--JSP Standard Tag Library--JSP标准标签函式库         当前版本 1.2.5     JSP 标准标签库(JSTL) JSP标准标签库(JSTL)是一个J ...

  10. Dorado事件的参数

    onClick,onSuccess 事件一般只有2个参数(self,arg),其实参数是可以添加的.可以把控件的ID直接放到参数里面来,然后在事件编辑里直接通过ID作控件对象,直接设值就好了,不要输入 ...