1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    380
    Vote Rating
    4
    gkatz is on a distinguished road

      0  

    Default Json Req from local PC to remote server [truly confused]

    Json Req from local PC to remote server [truly confused]


    Hi all;
    I have a Ajax json request to a remote server like so:
    Code:
    Ext.Ajax.request({
                    url: myRemoteServer,
                    method: 'get',
    this code works perfectly on the native devices (compiled in PG but in the browser I get :
    Code:
    XMLHttpRequest cannot load http://myRemoteServer/forum/rss/recentTopics.page?_dc=1387901550014&limit=25. Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.
    now, I can't seem to get why one would work (native) and the other will not (browser). I am a bit confused. any advise would be great.

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Posts
    380
    Vote Rating
    4
    gkatz is on a distinguished road

      0  

    Default


    got my answer from the PGB forum:
    "Hi, as Phonegap uses the file protocol (file:///), there is no domain. So no CORS restrictions apply and plain old AJAX simply works."

  3. #3
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    2,915
    Vote Rating
    89
    fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice

      0  

    Default


    Thanks for sharing your solution.
    Get more personalized support via a support subscription.

    Want to learn Sencha Touch 2? Check out
    Sencha training
    Sencha Touch in Action

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

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

    Need to include a test case use:
    The official Sencha Fiddle

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar