简体   繁体   English

Rails3 + link_to(…,:remote => true)+ IE 6/7不起作用

[英]Rails3 + link_to(…, :remote => true) + IE 6/7 does not work

I get this strange error if I use a link_to with the :remote => true parameter in IE 6 and IE 7. IE 8 and all other browsers works just fine: 如果我在IE 6和IE 7中将link_to与:remote => true参数一起使用,则会收到此奇怪的错误,IE 8和所有其他浏览器都可以正常工作:

IE7错误

If I commenting out the code for the link (jQuery binding on ajax:success), the error still appears. 如果我注释掉链接的代码(ajax:success上的jQuery绑定),错误仍然出现。 I don't know how to locate/track this error, because line 1529... does not exists. 我不知道如何定位/跟踪此错误,因为第1529行...不存在。 What is going wrong here? 这是怎么了?

The problem was the jQuery data() function to store stuf into DOM elements. 问题是jQuery data()函数将stuf存储到DOM元素中。 IE doesn't support this at all. IE完全不支持此功能。

http://api.jquery.com/jQuery.data http://api.jquery.com/jQuery.data

Note that this method currently does not provide cross-platform support for setting data on XML documents, as Internet Explorer does not allow data to be attached via expando properties. 请注意,此方法当前不提供跨平台支持来设置XML文档上的数据,因为Internet Explorer不允许通过expando属性附加数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM