-
24 Oct 2011 1:54 AM #1
json-p through store
json-p through store
- I get this error when i try to create a store that does a json-p request
- Uncaught Error: The 'jsonp' type has not been registered with this manager
var store = new Ext.data.Store ({
autoLoad: true,
method:'GET',
model: "User",
params: {
synID:300068,
room:0,
year:2011,
term:4,
day:2,
callType:'student'
},
proxy: {
type: 'jsonp',
url : 'https://intranet.trinity.vic.edu.au/timetable/getTimetable.asp',
reader: {
type: 'json',
root: 'users'
}
}
});
var localUser = new Ext.data.Store({
model: 'timetable',
proxy: {
type: 'localstorage',
id : 'localUser',
proxy: {
idProperty: 'id'
}
}
});
-
27 Nov 2011 5:40 AM #2
Same Issue
Same Issue
I am having the same issue at the moment. Did you figure out what you did wrong?
-
27 Nov 2011 1:31 PM #3
Ralberts
Ralberts
Hi
i did not fix the problem as such i just created a php file that responded with a callback. Json-P needs this callback as it is JSON wrapped in Javascript. You could try ajax through phonegap. as there is no problems with cross domain when you use the file:// system. i will be writing an article about that in the coming weeks and will post the url when it is done
matt
-
27 Nov 2011 1:32 PM #4
to amend my last post just use the word scripttag instead of json-p
-
28 Nov 2011 8:59 AM #5
If you change your proxy to scripttag like it is mentioned above, your JSONP requests will automatically be handled.
Code:proxy: { type: 'scripttag', url : 'https://intranet.trinity.vic.edu.au/timetable/getTimetable.asp', reader: { root: 'users' } }


Reply With Quote