Search code examples
sencha-touch

how to send jsonp request to server in sencha 2.0


I will get this error Repeatedly

Uncaught SyntaxError: Unexpected token : ajax.php

{"error":"Server Error</b>: Method file_get_contents unable to open request body!"}

Ext.data.JsonP.request({

                   url: 'http://yaksee.com/facebook/ajax.php',
        callbackKey: 'callback',
        params: {

                           format: 'json',


        },
        success: function(result) {





            if (result) {

        alert('success');

                     alert(result);

            } else {
                Ext.Msg.alert('Error', 'There was an error retrieving the weather.');
            }


        }
    });
}},

Solution

  • You Have to disable the Browser's web security

    Then it will be ok