Prototype的Ajax.Request在Chrome中不起作用 [英] Prototype's Ajax.Request not working in Chrome

查看:210
本文介绍了Prototype的Ajax.Request在Chrome中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是使用最新版本的Prototype进行简单的Ajax.Request调用。它可以在Firefox,Internet Explorer甚至Safari中正常工作......但在Chrome中无法正常工作。这是我的代码...



alert(url);
new Ajax.Request(url,{
method:'get',
onSuccess:function(transport){
alert('test');
}
});

它弹出URL提醒,但测试警报从未出现。就像我在其他浏览器中所说的那样。我没有得到任何JavaScript错误,我用Firebug。我在每个事件上做了一个console.log,它到达Ajax.Request的onLoading阶段,但从来没有onLoaded。



非常困惑...?

解决方案

在我发布之前,我刚刚下载了最新版本。所以它是1.6.0.3或任何它。不知道为什么它会有所作为,但它是CentOS,Lighttpd,PHP。它只是返回一些JSON。



Prototype虽然从不触发onLoaded事件,但它似乎在发送之前停滞不前。让我感到困惑的部分在错误日志中没有错误......并且它在Safari上工作。我认为,既然这两个都是Webkit,它们在两者中都是一样的。


I am just doing a simple Ajax.Request call using the newest version of Prototype. It works fine in Firefox, Internet Explorer, and even Safari... but not in Chrome. Here is my code...

alert(url); new Ajax.Request(url, { method: 'get', onSuccess: function(transport) { alert('test'); } });

It pops up he URL alert but the test alert never comes up. Like I said it does in every other browser. I am not getting any javascript errors and I have used Firebug. I did a console.log on each event and it gets to the onLoading stage of Ajax.Request but never onLoaded.

Very confused... ?

解决方案

I just downloaded the latest version before I posted this. So it is 1.6.0.3 or whatever it is. Not sure why it would make a difference but it is CentOS, Lighttpd, PHP. It just returns some JSON.

Prototype though never fires the onLoaded event, so seems like it is stalling before it gets sent. The part that baffles me is no errors in the error log... and it works on Safari. I'd think since both are Webkit it would be the same in both.

这篇关于Prototype的Ajax.Request在Chrome中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆