Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    34
    Vote Rating
    3
    MichelleWong is on a distinguished road

      0  

    Default SyntaxError: Parse error - Pls Help!

    SyntaxError: Parse error - Pls Help!


    When I want to load a json file in my datastore from a certain domain, i got the following error:

    SyntaxError: Parse error

    Source Class: http://domainA.com/test.js?_dc=13427...onP.callback50 Line 13

    On the server we already did the following as described from this thread:
    http://www.sencha.com/forum/showthre...aring-requests

    # add these lines after the htdocs directory section
    <Directory "/usr/local/apache2/htdocs/ws">
    Header set Access-Control-Allow-Origin "*"
    Header set Access-Control-Allow-Methods "GET,POST"
    Header set Access-Control-Allow-Headers "x-prototype-version,x-requested-with"
    </Directory>

    We have restarted the server's Apache, and we have also tried to use an xml file, but got the same error!

    How can I fix this in Sencha Architect?

    Please help!

  2. #2
    Sencha User
    Join Date
    Sep 2012
    Location
    Pakistan
    Posts
    2
    Vote Rating
    0
    alihamza007 is on a distinguished road

      0  

    Default SyntaxError: Parse error Source Class:

    SyntaxError: Parse error Source Class:


    I have the same problem.. please help.

    I can access the service from URL like http://localhost:8080/SomeService.svc/GetConnections and json data returned perfectly. i have tested the data with jsonlint.com too and data is perfect. But when i load this with jsonp store it throws the above mentioned error.
    Here is my store configuraionts,

    Ext.define('MyApp.store.MyJsonStore', {
    extend: 'Ext.data.Store',

    requires: [
    'MyApp.model.ConnectionModel'
    ],

    constructor: function(cfg) {
    var me = this;
    cfg = cfg || {};
    me.callParent([Ext.apply({
    storeId: 'MyJsonStore',
    model: 'MyApp.model.SomeModel',
    proxy: {
    type: 'jsonp',
    url: 'http://localhost:8080/SomeService.svc/GetConnections',
    reader: {
    type: 'json',
    root: 'connections'
    }
    }
    }, cfg)]);
    }
    });

    and here is my json Data that is returned from service.

    {"connections":[{"ActivationDate":"01\/02\/2011 03:47:28 PM","CompanyName":"Meter-Mimic Limited","DataNumber":"DataNumber","IP":"IP","NetworkTechnology":"GSM","OnlineStatus":"Offline","OperatorName":"T-Mobile Austria","Organization":"Organization","PhoneNumber":"436766012277","Status":"Active"}],"total":297406}

    and here is my model

    Ext.define('MyApp.model.SomeModel', {
    extend: 'Ext.data.Model',

    fields: [
    {
    name: 'PhoneNumber'
    },
    {
    name: 'NetworkTechnology'
    },
    {
    name: 'IP'
    },
    {
    name: 'DataNumber'
    },
    {
    name: 'CompanyName'
    },
    {
    name: 'Status'
    },
    {
    name: 'OperatorName'
    },
    {
    name: 'Organization'
    },
    {
    name: 'OnlineStatus'
    },
    {
    name: 'ActivationDate'
    }
    ]
    });


    Any Help plz.

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Location
    Dublin
    Posts
    72
    Vote Rating
    11
    iplanit will become famous soon enough

      0  

    Default


    Did you try to check the JSON generated in http://jsonlint.com/ ? (I did, it validates. It's correct.).
    Also, check if using another proxy like Ajax it works, and maybe you need to add the success: true to the response not sure. You should be testing from localhost to localhost it must be same origin unless you change something in your server as you seem to do.
    Quote Originally Posted by MichelleWong View Post
    When I want to load a json file in my datastore from a certain domain, i got the following error:

    SyntaxError: Parse error

    Source Class: http://domainA.com/test.js?_dc=13427...onP.callback50 Line 13

    On the server we already did the following as described from this thread:
    http://www.sencha.com/forum/showthread.php?162292-(CORS)-Cross-Origin-Resource-Sharing-requests

    # add these lines after the htdocs directory section
    <Directory "/usr/local/apache2/htdocs/ws">
    Header set Access-Control-Allow-Origin "*"
    Header set Access-Control-Allow-Methods "GET,POST"
    Header set Access-Control-Allow-Headers "x-prototype-version,x-requested-with"
    </Directory>

    We have restarted the server's Apache, and we have also tried to use an xml file, but got the same error!

    How can I fix this in Sencha Architect?

    Please help!