I define a store in my extjs5 MVC project. I want to access cross domain cgi file so set proxy type: 'jsonp'.
After I load the store the Chrome show me "Uncaught SyntaxError: Unexpected token :"
Here is my store:
Ext.define('Myproject.store.MyStore', {
extend: 'Ext.data.Store',
model: 'Myproject.model.MyStore',
proxy: {
type: 'jsonp',
url: 'http://mylink:8000/setting.cgi',
extraParams: {
act: 'get_lib_list'
},
reader: {
type: 'json'
}
}
});
Response content:
{ "success": false, "error_code": 5006, "error_msg": "No such file or directory (-2)" }
How do I fix this problem?
Thanks