-
3 May 2012 8:52 AM #1
Answered: JsonP not populating list
Answered: JsonP not populating list
Hello all, I have scoured the forums for a solution for the JsonP not populating list problem I am having and from what I can tell everything is setup up properly, but something is not quite right.
When using Ajax with a local .json file it works great, but when I change it over to JsonP the list is blank and there are no errors in the console.
Here is my proxy info:
Here is a sample of what is being returned when I view the url in a browser window.Code:proxy: { type: 'jsonp', url: 'http://domainiamusing.com/mobiledata/?callback=ShowsCallback', reader: { type: 'json', rootProperty: 'shows' } }
This is just baffling me. Does anyone have any thoughts on what may be wrong?Code:ShowsCallback({"shows":{[{"usID":"258","usEventName":"Memphis","usEventType":"4","usEventStatus":"2","usEventOnSaleDateBegin":"9/24/2011 12:00:00 PM","usEventOnSaleDateEnd":"5/13/2012 11:30:00 PM","usEventDateBegin":"5/1/2012 12:00:00 AM","usEventDateEnd":"5/13/2012 11:30:00 PM","usEventBuyTicketsUrl":""}]} }
Thanks,
Paul
-
Best Answer Posted by skirtle
Please post questions to the relevant Q&A or Help forum. I would move this thread but you haven't said which framework/version you're using so I don't know where to move it.
You shouldn't be specifying the name of the callback function in the URL. The framework will generate a unique function name for you and add it to the URL itself.
-
3 May 2012 11:40 AM #2
Can anyone help me with this? Thanks!
-
6 May 2012 5:19 PM #3
Please post questions to the relevant Q&A or Help forum. I would move this thread but you haven't said which framework/version you're using so I don't know where to move it.
You shouldn't be specifying the name of the callback function in the URL. The framework will generate a unique function name for you and add it to the URL itself.
-
7 May 2012 7:52 AM #4
Hi skirtle,
This is Sencha Touch 2.
Thanks for your response to the problem. I removed the specification of the callback function in the URL. I also had to adjust a few things in my json file creation, and now it works great.
Paul
-
16 May 2012 1:17 PM #5Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,657
- Vote Rating
- 435
- Answers
- 3109
Are you sure the callback function you have in your response is 100% what is sent as a parameter in your request?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
16 May 2012 1:38 PM #6
Yeah, it's working great now. Sorry, I should have closed this post.


Reply With Quote