Team:Warsaw/JSTest
From 2008.igem.org
(Difference between revisions)
Line 57: | Line 57: | ||
document.getElementById("progress").innerHTML=req.statusText; | document.getElementById("progress").innerHTML=req.statusText; | ||
+ | var ansStr=req.responseText; | ||
+ | //ok lets correct damn wiki xhtml code errors | ||
+ | ansStr=ansStr.replace("<img src='/wiki/skins/common/images/wiki.png'>",""); | ||
- | + | ansStr=ansStr.replace("</p><p>",""); | |
+ | |||
+ | //ansStr=ansStr.replace("</p><p><br />","</p><p><br/></html>"); | ||
+ | var parser=new DOMParser(); | ||
+ | ans=parser.parseFromString(ansStr, "text/xml" ); | ||
//.getElementById("WarNotebook"); | //.getElementById("WarNotebook"); | ||
- | document.getElementById("result").innerHTML= | + | document.getElementById("result").innerHTML=(new XMLSerializer()).serializeToString(ans); |
} | } |
Revision as of 19:39, 17 October 2008