PDA

View Full Version : Easiest way to load external html content into a view



scheid
3 Feb 2012, 8:09 AM
Hi All,

I'm using Sencha Touch 2 pr4. I have a number of views that will need to be just plain, static html. They won't have any controls, interactivity, etc. I have been attempting to load these into a ext.panel, thinking that there is a method in the panel class to do this, like 'loadContent' or something like that, but I haven't found one yet. Does an easy method exist for that? I've seen posts involving creating functions to load the content via ajax, but seems like a lot of people would need just plain html views like I do.

Also, if not with a panel, is there a way to define a view that is just plain html, not using a panel?

Sorry if this is an obvious question; I'm still a bit of a noob.

Thanks.

mitchellsimoens
3 Feb 2012, 8:22 AM
You should be able to do an Ajax request if it is same domain

scheid
3 Feb 2012, 8:42 AM
Hi Mitchell,

Thanks. So is that the only way to accomplish it? I'm probably going to be having a lot of these types of views in the future, so I want to figure out the cleanest way to do it.

Is there a way that html content from a URL can be it's own view, or does a view have to descend from a container, panel, etc. ?