Jquery, "$.each(", function returns error in IE. 'Length' is null or not an object
- by Collin Estes
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.