2

I have an external html within a Panel in Extjs. But the scripts which are defined with script tags in my html are not loaded; thus therefore my html does not work properly.

var test = Ext.create('Ext.panel.Panel', { title : 'Example 1', width : 250, height : 250, frame : true, scripts: true, autoLoad : { url : './test.html' } }) 

Until now i have tried:

The first two load my script to the Extjs (i can see it in firebug) but still my html file can not access it.

Thus;

What are the (working) alternatieves to get it working?

0

1 Answer 1

1

The autoLoad config is deprecated. Use loader instead.

var test = Ext.create('Ext.panel.Panel', { title : 'Example 1', width : 250, height : 250, frame : true, loader: { url: './test.html', autoLoad: true, scripts: true } }); 
Sign up to request clarification or add additional context in comments.

4 Comments

Correct! but please update that we also have to add: "render: 'html' to "loader" so that the scripts can be readed! Although it is an answer to my question, i think it is not the correct way of use. Because, in every opening of the page, scripts will be loaded again and again (Also does not work in Firefox 31 and Chrome 37). Is there another way to load the scripts in Extjs AND we will still be able to use them also in a external html file?
@Asqan There is no render config. There is a renderer which already defaults to html, so it should not be needed. As to your second problem, it's outside of the scope of the initial question, which has been answered. At StackOverflow we like each question to be about a single problem so that it can be most useful to others.
Therefore i had already created another question for that very related question you are welcome!
No, i meant that i would like to see your answer also in that question. It was just a translation error. But anyway, thank you absolutely :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.