Load a script file in sencha, supports both asynchronous and synchronous approaches
//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的更多相关文章
- 网页提示[Not allowed to load local resource: file://XXXX]错误
网页通过http 访问时, 点击打开文件的link.在Chrome 中会报 Not allowed to load local resource: file// XXXX 的错误 <!--Add ...
- 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 ...
- 报错: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 ...
- 遇到一个奇葩的问题,could not load the assembly file XXX downloaded from the Web
在我这编译好好滴,发给客户那边居然不通过,报could not load the assembly file:///xxx.dll, 查阅了一些文档后,发现原来是文件的安全问题,是由于我把文件压缩打包 ...
- 出现错误: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 ...
- 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 ...
- 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/ ...
- 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 ...
- 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 ...
随机推荐
- Spring-boot使用Ehcache配置
1.配置类 @Configuration @EnableCaching public class CacheConfiguration {// implements CachingConfigurer ...
- santoku学习笔记
帮助文档:https://santoku-linux.com/faqs The first time you log in your username and password are “Santok ...
- 禁用 Browser Link,在浏览器调试的时候回出现大量的get,post数据。
VS2013新增的Browser Link功能虽然“强大”,但默认是开启的,很烦人!
- Java队列实现
队列数组实现:队列长度有限,但是考虑到平时一般都使用有界队列,这应该也不算是个缺点 public class Queue { private Object[] objs; private int he ...
- JavaScript入门(8)
一.什么是对象 JavaScript中的所有事物都是对象.如:字符串.数值.数组.函数等.每个对象带有属性和方法. 对象的属性:反映该对象某些特定的性质的.如:字符串的长度.图像的长宽 对象的方法:能 ...
- 无责任比较thrift vs protocol buffers
http://blog.csdn.net/socoolfj/article/details/3855007 最新版本的Hadoop代码中已经默认了Protocol buffer作为RPC的默认实现,原 ...
- ASP.NET Web Service如何工作(2)
ASP.NET Web Service如何工作(2) [日期:2003-06-26] 来源:CSDN 作者:sunnyzhao(翻译) [字体:大 中 小] HTTP管道一旦调用了.asmx句柄,便 ...
- [DP] LGTB 玩THD (复杂状态DP)
LGTB 玩THD LGTB 最近在玩一个类似DOTA 的游戏名叫THD有一天他在守一座塔,对面的N 个小兵排成一列从近到远站在塔前面每个小兵有一定的血量hi,杀死后有一定的金钱gi每一秒,他都可以攻 ...
- 【nodemailer】之 work with mustache
之前对nodemailer做了简要的研究,基本上是搞定了发邮件的问题.但很多情况下邮件的内容不是固定的,然后又需要有一个合适的样式,这就需要使用模板了.nodemailer有nodemailer-ma ...
- async:false同步请求,浏览器假死
// 异步请求导致数据错乱 // function get_num(){ // $("input[name='monitor']").eq(1).attr('checked',tr ...