PDA

View Full Version : Loading the content of a html file into a panel in ExtJS 4



zoggo
31 Aug 2011, 12:15 AM
Hi,

In ExtJS 3 I could load the conent of a HTML-File with the autoLoad property. In ExtJS 4 it seems that I have to use the loader property. I used that like this:



{ xtype: 'container',
loader: {
url: './Scripts/ModulCollectionModuls/ModulOneMinute/html/willkommen.htm',
autoLoad: true
}
}


When I try the code I get that Error: Access to restricted URI denied" code: "1012. What's going wrong? Do I need a proxy configuration?

Thanks for every hint!

Urs

skirtle
1 Sep 2011, 11:58 AM
Are you serving up your page directly off the filesystem rather than through a server? That error is what happens when an Ajax request tries to access the filesystem.

zoggo
11 Sep 2011, 11:16 PM
Yes, I was working on my local filesystem. I moved to to a LAMP and now all is working properly. Thanks!

laino1245
17 Nov 2011, 5:59 AM
Hi! and thanks for the tip! ;)

So how can the new "load" feature be implemented on a tab? Do I start with the items: [...], and inside the item I set xtype to container? I would be very useful to add an example in the docs section. :)

Thanks!

skirtle
18 Nov 2011, 6:59 AM
@laino1245. I'd suggest starting a new thread for your question. This is a Q&A forum and each thread is intended to answer a single question, a little like Stack Overflow.