I use Cytoscape Web for generating gene maps. It needs string to draw and I have XGMML files so I used JQuery for getting the XGMML file and turning them into strings. Here is my codepiece:
$.get("ENSG00000148606.xgmml", function(data) {
if (typeof data !== "string") {
if (window.ActiveXObject) { // IE
data = data.xml;
} else {
data = (new XMLSerializer()).serializeToString(data);
}
}
vis.draw({ network: data }); //Line that draws the map. It's from Cytoscape Web.
});
it works perfectly on IE but when I try other browsers, I'm getting nothing. I tried to figure out what's wrong via alert(data); and I get an empty alert box for all browsers except IE.
Any ideas?