Jquery, "$.each(", function returns error in IE. 'Length' is null or not an object

Posted by Collin Estes on Stack Overflow See other posts from Stack Overflow or by Collin Estes
Published on 2010-02-04T20:53:37Z Indexed on 2010/03/24 4:23 UTC
Read the original article Hit count: 334

My code is working fine in FireFox but my users are restricted to IE. I'm getting an error though in IE, related to my JQUERY function.

 populateTable:function(returnList) {


     var self = this;
     var eat = $.evalJSON(returnList.firstChild.textContent)
     $.each(eat,function() {


$("<tr><td>" + this.reportId + "</td><td>" + this.description + "</td><td>" + 
this.drawingNumber + "<td></tr>").insertAfter(self.tblResults[0].childNodes[1]);

 })


}

IE is erring on the $.each with the message below:

'Length' is null or not an object

Any ideas or maybe a workaround for the $.each function?

Update: returnList is an XML document object from an Ajax call. I'm trying to retrieve the JSON object string located within the XML tag.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about internet-explorer