-
30 Mar 2012 3:31 AM #1
Ext.data.JsonP.request not working
Ext.data.JsonP.request not working
Hello,
I am using Sencha Touch 2 and Phonegap (Cordova 1.5) together and when I want to do a JsonP request i get the following error in XCODE:
This is my code:Code:[INFO] Error in success callback: org.apache.cordova.camera1 = TypeError: 'undefined' is not an object
When I leave the JsonP request away, everything is working fine. What am I doing wrong?Code:function takePhoto() { navigator.camera.getPicture(onSuccess, onFail, { quality: 50, destinationType: Camera.DestinationType.DATA_URL }); function onSuccess(imageData) { var image = document.getElementById('myImage'); // Make the JsonP request Ext.data.JsonP.request({ url: 'http://free.worldweatheronline.com/feed/weather.ashx', callbackKey: 'callback', params: { key: '23f6a0ab24185952101705', q: '94301', // Palo Alto format: 'json', num_of_days: 5 }, success: function(result) { alert('Success!!'); } }); } function onFail(message) { alert('Failed because: ' + message); } }
Thanks in advance!
-
30 Mar 2012 5:31 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,581
- Vote Rating
- 433
Is Ext.data.JsonP loaded/required?
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.
-
30 Mar 2012 6:19 AM #3
-
10 May 2012 1:10 AM #4
Hii...
I am getting same issuee if you are able to solve it plz let me know.
Urgent.....
Regards
Sachin Sachdeva.
-
10 May 2012 8:20 AM #5Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,581
- Vote Rating
- 433
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.
-
10 May 2012 9:09 PM #6
But i am using MVC Getting started example provided on sencha website.
Can you plz let me know how can i include class through that.
Just provide me a hint so that i can implement the same ASAP.
Regards
Sachin Sachdeva,
-
11 May 2012 5:41 AM #7Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,581
- Vote Rating
- 433
With one of the require means like Ext.require
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.


Reply With Quote