Closed DePeterCool closed 7 years ago
For what it's worth, a small addition to the editablegrid.js file solves the problem (even though the comments say that no callback "tableLoaded" is needed):
/**
http://tcoztechwire.blogspot.com/2012/04/setxmlfromstring-extension-for.html */ EditableGrid.prototype.loadXMLFromString = function(xml) { if (window.DOMParser) { var parser = new DOMParser(); this.xmlDoc = parser.parseFromString(xml, "application/xml"); } else { this.xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); // IE this.xmlDoc.async = "false"; this.xmlDoc.loadXML(xml); }
this.processXML(); this.tableLoaded(); };
I'm trying to load XML data from a string instead of a file, but it's not working. Attached are 2 versions of the "minimal" demo. One with the XML data in a file (which is working) and one where the exact same data is in a string (which doesn't work). I'm not getting any errors in JS, so i'm at a loss as to what i'm doing wrong. minimal.zip