1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    21
    Vote Rating
    0
    khadarmeeran is on a distinguished road

      0  

    Default Sencha json Ajax request fails to fetch response and shows "origin null is not alowd

    Sencha json Ajax request fails to fetch response and shows "origin null is not alowd


    the following code fails to fetch the json response

    & it shows the error ---XMLHttpRequest cannot load https://meme.hcl.com/services/json. Origin null is not allowed by Access-Control-Allow-Origin.

    may i know the reason? pls reply....
    -------------------------------------------------------
    var con = new Ext.data.Connection();
    con.request({url:
    'https://meme.hcl.com/services/json', // where to do the request
    // jsonData: jsonData, // << key value object with data to send
    method:
    'POST',callback: function(opts, success, response) {if (!success) {// Ext.MessageBox.alert("Error",
    //"Error retrieving data - try again");
    alert(response.responseText);
    return;}//use the answer of the request, which is contained in response.responseText
    alert(response.responseText) }
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,678
    Vote Rating
    749
    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


    If you are trying to load from a different domain than the one your app is on then you are restricted. You must use ScriptTag proxy or Ext.util.JsonP to get around the browser restrictions.
    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
    Nov 2011
    Posts
    21
    Vote Rating
    0
    khadarmeeran is on a distinguished road

      0  

    Default


    thanks it helps me

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