PDA

View Full Version : JSONP request



dking3
15 Aug 2011, 11:05 PM
Below is the code im trying to use to call the yahoo local web service but having no luck if some1 good pin point my error it would be really helpful


Ext.onReady(function() {


var resultTemplate = new Ext.Template.from('result-template');

var updateResults = function(data1) {

Ext.each(data1, function() {

resultTemplate.append('resultset', this);
});
}


Ext.ux.JSONP.request({
url:'http://local.yahooapis.com/LocalSearchService/V3/localSearch',
callbackKey: 'jsoncallback',
params: {

appid:'nYab7R7V34Hbhw5MM6b0L7acXf5KUNxF5IlbbGsfZ8TogsPqUSVw9djJ3erWGAVuGQyqRCQy9TPI',
query: 'pizza',
zip:'13206',
results:'3',
output: 'json'
},
callback: updateResults


});


})