来自 xul 的 Ajax 请求在 Firefox 2 中不起作用
我正在开发一个 Firefox 扩展,并一直在 Firefox 3 中开发它,我在 Firefox 2 上测试它,由于某种原因,我的 HTTP 请求都没有被触发。 请求的格式如下(使用原型):
theResponse = function(response){
//some code
}
new Ajax.Request(url,{
method:'get',
parameters : {url: currentURL},
onSuccess: theResponse,
onFailure: function(){ alert('Something went wrong...') }
});
我一直在尝试寻找解决方案,但我发现的最接近的事情与跨站点 HTTP 请求有关,有人有任何想法吗?
I'm working on a firefox extension and have been developing it in Firefox 3, I went to test it on Firefox 2 and for some reason, none of my HTTP requests is firing. The format of the requests are below (using prototype):
theResponse = function(response){
//some code
}
new Ajax.Request(url,{
method:'get',
parameters : {url: currentURL},
onSuccess: theResponse,
onFailure: function(){ alert('Something went wrong...') }
});
I have been trying to find a solution but the closest thing I've found is something to do with cross-site HTTPrequests, anyone has any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发现问题与原型执行 HTTP 请求的方式有关,切换到使用 jquery 并且没有进一步的问题......无论如何,HTTP 请求都很好。
Figured out the problem was to do with the way prototype performs HTTPrequests, switched to using jquery and no further problems ... well with HTTPrequests anyway.