1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    45
    Vote Rating
    0
    Answers
    2
    cooperka is on a distinguished road

      0  

    Default Answered: List doesn't load json data in browser

    Answered: List doesn't load json data in browser


    I have a really simple Sencha Touch 2.0.1 app made with Sencha Architect 2.0.0: a list of items loaded from a json file online (here).

    If I export it to an APK and install it on my droid, it displays perfectly. However if I try it on Chrome or Safari, they say 'Loading...' then display the word 'empty' where the list should be.

    I get this error in Firebug:
    Code:
    GET http://listtest.webs.com/data.json?_dc=1344620739517&page=1&start=0&limit=25 x 166ms
    (where that 'x' is circled in red, meaning the request failed I guess). The Response field is blank, even though that's a valid URL.

    Here are links to my full code. Thanks for any help you may have.

    .xda archive: http://www.mediafire.com/?11ism2o13gkcz27
    .zip file: http://www.mediafire.com/?f76by4d445vb6zu

    Extra info: I'm using WAMPSERVER 2.2 with default config, and I've had this problem with most of my other apps as well. The CityBars tutorial from Sencha works completely in Chrome, and loads the title bar in Safari but does not load any items to click on.
    Attached Files

  2. Sorry I didn't realize this thread still existed, I solved my problem long ago. Thanks though! It was due to access-allow-origin in my browser, I had to switch to using JsonP.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,549
    Vote Rating
    873
    Answers
    3567
    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


    Any errors in the console like maybe CORS error?
    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.

  4. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    45
    Vote Rating
    0
    Answers
    2
    cooperka is on a distinguished road

      0  

    Default


    Sorry I didn't realize this thread still existed, I solved my problem long ago. Thanks though! It was due to access-allow-origin in my browser, I had to switch to using JsonP.

Thread Participants: 1

Tags for this Thread