Not sure what you complain about, you have
function loadcode(File, Dest) {
var req = new XMLHttpRequest();
if (req) {
req.onreadystatechange = function() {
if (req.readyState == 4 && req.status == 200) {
removecode(Dest);
var demo = document.getElementById(Dest);
demo.appendChild(document.createTextNode(req.responseText));
}
};
req.open('GET', File);
req.send(null);
}
}
so you simply make a text node with the complete responseText and then
insert that into the document, that is why you see the source you fetch.
If you want to use responseText then you should set
demo.innerHTML = req.responseText;
but at least in Mozilla that is going to present problems as your page
is served as application/xhtml+xml and innerHTML setting doesn't work
there. But of course with Mozilla you could fetch XHTML (make sure you
have the proper namespace on the elements then e.g.
<div xmlns="
http://www.w3.org/1999/xhtml">...</div>
and then you can use responseXML and use importNode to copy the nodes
into the existing document.
For IE however you need another strategy.
And that JavaScript file your page includes also seems to try to use
Java via LiveConnect for Opera, I haven't looked close enough to tell
you whether that emulation gives you more than responseText and how to
use it, ask the author of that stuff.