【发布时间】:2010-06-24 17:32:11
【问题描述】:
大家好,我有一个奇怪的问题,我一直在使用 Flickr API,在 Flickr 中与服务器建立连接是通过 url 格式在我的情况下类似这样的
如果您运行到任何浏览器,您将获得一个 flickr 功能并且没问题,但我试图通过 Prototype 的 Ajax 获得我正在做类似的事情
new Ajax.Request('http://api.flickr.com/services/rest/?method=flickr.photosets.getList&api_key=10cb3dccaa050efebdc01540c1d4d227&user_id=51390557@N07&format=json',
{
method:'get',
onSuccess: function(transport){
debugger;
var response = transport.responseText || "no response text";
alert("Success! \n\n" + response);
},
onFailure: function(){ alert('Something went wrong...') }
});
并且在 IE 中运行良好,但在 Firefox 中我不知道为什么我在 responseText 中得到一个空白字符串“”。有没有人知道我做错了什么?
谢谢
【问题讨论】:
-
嗯我猜是跨域问题我发现了这个,dandean.com/jsonp-for-prototypejs我猜原型不直接支持
标签: javascript ajax prototypejs flickr