分机没有定义 [英] Ext is not defined
问题描述
我试图实现与ExtJS的一个在TinyMCE插件,以演示为例,在这里找到:的链接。
I'm trying to implement a TinyMCE plugin with ExtJs, with a demo as example, found here: link.
这将会失败,因为我在Firebug收到没有定义外部的错误。我基本上是复制的例子中,我只用分机的新版本。首先,CSS和脚本包括:
This fails because I receive an "Ext is not defined" error in Firebug. I basically copied the example, I only used a newer version of Ext. First of all the css and scripts are included:
<link href="scripts/extjs/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script src="scripts/extjs/ext-all.js" type="text/javascript"></script>
<script src="scripts/miframe/miframe-min.js" type="text/javascript"></script>
<script src="scripts/tinymce/jscripts/tiny_mce/tiny_mce_src.js" type="text/javascript"></script>
<script src="scripts/ux/Ext.ux.TinyMCE.js" type="text/javascript"></script>
萤火虫不会抱怨,所有的脚本在指定的路径中找到并被列入
Firebug does not complain, all the scripts are found on the specified paths and are included.
接下来,我调用外部函数在我的aspx文件的头部,
Next I call the Ext function in the head of my aspx document,
<script type="text/javascript">
console.log("Ready...");
Ext.onReady(function() {
console.log("set...");
Ext.get("cmdOpen").on("click", function() {
console.log("GO");
var dlg = new Ext.Window({
//etc
</script>
本的console.log(准备...)显示在控制台,那么code休息。还有为外部没有定义四大引用,在EXT-all.js的(),miframe-min.js(),Ext.ux.TinyMCE.js(),并在.aspx文件中code 。 (Default.aspx的)
The console.log("Ready...") shows up in the console, then the code breaks. There are four references to "Ext is not defined", in ext-all.js(), miframe-min.js(), Ext.ux.TinyMCE.js() and in the code in the .aspx file. (Default.aspx)
我没有改变文件包含的任何方面,他们的官方版本。
我是不是缺少或许声明的地方?还是我必须包括其他东西还是?我诚实地不知道。
I did not alter any aspect of the included files, they are official releases.
Am I perhaps missing a statement somewhere? Or do I have to include other things still? I have honestly no clue.
推荐答案
即使包括EXT-所有(-debug)的.js,你仍然需要包括之前的EXT-base.js文件,否则你会得到外部没有定义的错误。不知道你最后的评论,如果你已经是过去的这个或没有,但我想我会指出来。请参阅此页关于如何您的包括应建立完整的详细信息:
Even when including ext-all(-debug).js, you still need to include the ext-base.js file before that, otherwise you will get the "Ext is not defined error". Not sure by your last comment if you are already past this or not, but I thought I would point it out. Please see this page for complete details on how your includes should be set up:
http://www.extjs.com/learn/Tutorial%3AHTML% 5FPage%5FSetup
这篇关于分机没有定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!