IE使用jquery的参数无效(IE Invalid argument with jquery)

编程入门 行业动态 更新时间:2024-10-22 20:26:41
IE使用jquery的参数无效(IE Invalid argument with jquery)

我有一个在Firefox和Chrome中完美运行的portlet应用程序,但是在IE 8和9中爆炸,但是只有在门户页面上有5个或更多portlet实例时才会出现。 如果页面上有4个或更少的portlet实例,它在IE中也能正常工作。

当我在页面上有5个以上的portlet实例时,我看到的错误是:

SCRIPT87:参数无效。 jquery-1.5.2.min.js,第16行,第25442行

代码使用jQuery和一些插件,即jqGrid。 以下是我迄今为止试图解决的问题,其中没有一个有任何区别:

升级了jQuery和jQuery-UI库。 代码分别使用1.5.2和1.7.2。 升级到最新版本没有任何区别。 升级了jqGrid库。 该代码使用版本4.1.2。 升级到4.3.2没有任何区别。 升级了bgiframe插件。 该代码使用2.1版。 升级到2.1.3没有任何区别。

因为它是IE,所以很难调试以查看发生了什么。

有没有人见过这种行为或对可能发生的事情有任何想法?

更新:

好的,我已经用非缩小版本替换了jQuery文件的最小版本。 这是我在IE 8页面上有5个以上portlet实例时看到的错误:

Message: Invalid argument. Line: 2105 Char: 5 Code: 0 URI: https://nasa-iceint.nasa.gov/portal/ice-theme/js/jquery-1.5.2.js

以下是jQuery文件中的相关代码:

if ( set ) { // convert the value to a string (all browsers do this but IE) see #1070 elem.setAttribute( name, "" + value ); }

有任何想法吗?

I have a portlet application that works flawlessly in Firefox and Chrome, but is bombing out in IE 8 and 9, BUT only if I have 5 or more instances of the portlet on the portal page. If there are 4 or less instances of the portlet on the page, it works fine in IE too.

The error I see when I have 5+ instances of the portlet on the page is:

SCRIPT87: Invalid argument. jquery-1.5.2.min.js, line 16 character 25442

The code uses jQuery and a handful of plug-ins, namely jqGrid. Here is what I have tried so far to resolve the issue, none of which has made any difference:

Upgraded the jQuery and jQuery-UI libraries. The code uses 1.5.2 and 1.7.2 respectively. Upgrading to the latest versions made no difference. Upgraded the jqGrid library. The code uses version 4.1.2. Upgrading to 4.3.2 made no difference. Upgraded the bgiframe plug-in. The code uses version 2.1. Upgrading to 2.1.3 made no difference.

Because it is IE, it is very difficult to debug to see what is going on.

Has anyone seen this behavior before or have any idea as to what may be going on?

UPDATE:

OK, I have replaced the min versions of the jQuery files with the non-minified ones. Here is the error I see when I have 5+ instances of the portlet on the page in IE 8:

Message: Invalid argument. Line: 2105 Char: 5 Code: 0 URI: https://nasa-iceint.nasa.gov/portal/ice-theme/js/jquery-1.5.2.js

Here is the pertinent code from the jQuery file:

if ( set ) { // convert the value to a string (all browsers do this but IE) see #1070 elem.setAttribute( name, "" + value ); }

Any ideas?

最满意答案

我弄清楚这里出了什么问题。 事实证明,当已经加载了大量CSS时,在IE中动态加载CSS文件会导致问题。 请参阅动态加载css样式表不适用于IE

希望这可以帮助遇到同样问题的其他人。

I figured out what was going wrong here. It turns out that loading a CSS file dynamically in IE when there is already a lot of CSS loaded can cause issues. See Dynamically loading css stylesheet doesn't work on IE

Hopefully this helps someone else down the road who encounters the same issue.

更多推荐

本文发布于:2023-08-01 03:31:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1353988.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:参数   jquery   argument   Invalid

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!