Wednesday, April 7, 2010

IE javascript error "Invalid argument"

If you get one of the following errors in IE when running jQuery and/or jqGrid:

Message: Invalid argument.
Line: 112
Char: 247
Code: 0
URI: http://.../jquery-1.4.min.js


or

Message: 'p.cellLayout' is null or not an object
Line: 10
Char: 56008
Code: 0
URI: http://.../jquery.jqGrid.min.js


It is quite possibly that you are trying to set something to null. Check if any of the javascript variables in the page are null and being used as parameter to call a jqGrid or jQuery function.

NOTE: IE often doesn't specify the correct line number. So even though it may say line 10, the error could be somewhere else, this is why it is so hard to debug IE. The reason is dynamic pages where javascript libraries and content is added on the fly, IE can't keep up with this.

No comments:

Post a Comment