1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    387
    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
    387
    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
    3,877
    Vote Rating
    128
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi