0

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:

  1. 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.
  2. Upgraded the jqGrid library. The code uses version 4.1.2. Upgrading to 4.3.2 made no difference.
  3. 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?

Zendog74
  • 65
  • 2
  • 13
  • Not sure about your problem directly, but there are addons you can use to debug in IE. Here's just [one of them](http://www.firebugger.com/) – Terry Apr 19 '12 at 20:46
  • 3
    You can swap out the minified version of jquery-1.5.2.min.js for jquery-1.5.2.js and get a better idea of where the error is happening. – Sam Tyson Apr 19 '12 at 20:50
  • +1, using the un-minified version of jquery will help greatly. – jimw Apr 19 '12 at 21:13
  • Have you had any luck with the latest versions of jQuery and jQueryUI? – Surreal Dreams Apr 23 '12 at 20:33
  • Nope. I tried upgrading to the almost most recent versions of jQuery and jQuery-UI and still saw the same error. Granted, I still used the minified versions, but that should not make any difference. – Zendog74 Apr 23 '12 at 20:42

3 Answers3

4

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.

Community
  • 1
  • 1
Zendog74
  • 65
  • 2
  • 13
0

Maybe your page is adding a JSON that is not well formed.

var jsonThatWorksOnFirefoxAndChrome = {
    first:"ok",
    last: "not ok, remove the comma after this string to fix it",
}

Chrome and Firefox will just ignore the final comma.

Juliano
  • 2,422
  • 21
  • 23
0

Also check for jQuery conflicts and make sure you include only one version of jQuery and only once.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459