最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

asp.net - Ext is not defined - Stack Overflow

programmeradmin1浏览0评论

I'm trying to implement a TinyMCE plugin with ExtJs, with a demo as example, found here: link.

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 plain, all the scripts are found on the specified paths and are included.

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>

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.

I'm trying to implement a TinyMCE plugin with ExtJs, with a demo as example, found here: link.

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 plain, all the scripts are found on the specified paths and are included.

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>

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.

Share Improve this question edited Apr 25, 2019 at 7:52 Glorfindel 22.7k13 gold badges90 silver badges119 bronze badges asked Sep 22, 2009 at 9:25 KablamKablam 2,6015 gold badges29 silver badges47 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 3

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 ment if you are already past this or not, but I thought I would point it out. Please see this page for plete details on how your includes should be set up:

http://www.extjs./learn/Tutorial:HTML_Page_Setup

there is a firefox extension called "jsview", it allows you to see what scripts and css files are included on a page.

When navigating to the link you include at the top of your post and opening the ExtJs file, you'll notice that the example provided is using version 2.1 of the code.

The Ext.ux.TinyMCE v0.6 has a corresponding blog post here. You will notice that it specifically requires:

  • Firefox 2+, Opera 9+, MSIE 7
  • ExtJS 2.1
  • TinyMCE 3.1.0.1
  • Ext.ux.ManagedIframePanel

Be aware that when plugging in a newer versions of the TinyMCE or ExtJs libraries, there might (read will) be breaking changes that you will then have to resolve. You could try scrape the files directly from the example to ensure you have a working version.

If you choose to use ExtJs v3+, get the latest ponents:
1) ux.ManagedIframe has been maintained more recently and even upgraded for ExtJS 3.x here
2) Read through the ux.TinyMce thread and download the latest version. I think it's 0.7b. If you're still having problems, that's probably the best place to find answers.

copy the lib folder in your eclipse workspace`s exjts project folder and just give the relative paths, is should than work

Go to ExtJs website and make sure you download and included all the necessary files and IN ORDER,also using a newer version might break the code. try it with simpler examples and only reference the ext stuff and see if it loads

发布评论

评论列表(0)

  1. 暂无评论