P
P
Perzh2014-03-28 22:37:17
Django
Perzh, 2014-03-28 22:37:17

ExtJS (ReferenceError: Ext is not defined) - how to fix?

Hello. I decided to try ExtJS, got stuck on Hello world =) I
connect ExtJS (files are loaded normally):

<link type="text/css" href="{{ STATIC_URL }}ext-3.4.1/resources/css/ext-all.css">
<script type="javascript" src="{{ STATIC_URL }}ext-3.4.1/adapter/ext/ext-base.js"></script>
<script type="javascript" src="{{ STATIC_URL }}ext-3.4.1/ext-all.js"></script>

Then I try to call the window:
<script>
        Ext.onReady(function() {
           Ext.Msg.alert('Тест', 'Hello, world!');
        });
</script>

Every time I get ReferenceError: Ext is not defined.
Here is what the mozilla shows:
23:28:31.811 GET http://127.0.0.1:8000/note/1/ [HTTP/1.0 200 OK 12мс]
23:28:31.774 ReferenceError: Ext is not defined 1:26
23:28:31.901 GET http://127.0.0.1:8000/static/ext-3.4.1/adapter/ext/ext-base.js [HTTP/1.0 304 NOT MODIFIED 14мс]
23:28:31.902 GET http://127.0.0.1:8000/static/ext-3.4.1/ext-all.js [HTTP/1.0 304 NOT MODIFIED 14мс]

Tell me, please, what could be the matter? Thanks in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Perzh, 2014-03-29
@Perzh

In general, it was necessary to put it everywhere. type="text/javascript"Well, perhaps restarting the laptop helped somehow, I don’t know

V
Vit, 2014-03-29
@fornit1917

judging by logs, you address to Ext before it is loaded.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question