1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    63
    Vote Rating
    2
    scheid is on a distinguished road

      0  

    Default Easiest way to load external html content into a view

    Easiest way to load external html content into a view


    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.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,345
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You should be able to do an Ajax request if it is same domain
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    63
    Vote Rating
    2
    scheid is on a distinguished road

      0  

    Default


    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. ?

Thread Participants: 1