제가 티스토리 혹은 테터(큐브)에서 아래와 같은 소스를 통해 xml 1.0 문서를 출력하려고 하는데요.. 서버상에서 돌리면 문제가 없으나 왜 하필 티스토리/테터에서만 돌리면 에러가 뜨는지 도통 모르겠습니다 ㅠ_ㅠ_ㅠ_ㅠ
소스1.
<script>
var sHttp = new ActiveXObject("Microsoft.xmlhttp");
function httpGet(szURL) {
sHttp.open("GET",szURL,false);
sHttp.setRequestHeader( "Content-type:", "text/html");
sHttp.onreadystatechange = onRetriveComplete;
sHttp.send();
if (sHttp.status > 200) alert("200 Error");
}
function onRetriveComplete() {
if (sHttp.readyState == 4) {
sHttp.onreadystatechange = noop; //re-entrant gate
document.all('contentView').innerHTML = sHttp.responseText;
}
}
function noop() {
return false;
}
</script>
<body onLoad="httpGet('data.xml');">
<div id='contentView' width="100%" height="100%">Wait for loading...</div>
</body>
---------------------
소스2.
<script>
function loadxml()
{
var xDoc = new ActiveXObject("Microsoft.XMLDOM");
xDoc.async = false;
xDoc.load("data.xml");
var root = xDoc.documentElement;
var html = "";
for(var i=0; i<root.childNodes.length;i++) {
html += "<a href='";
html += root.childNodes.item(i).childNodes.item(1).text + "'>" + root.childNodes.item(i).childNodes.item(1).text + "</a><br>";
}
document.all.oa.innerHTML = html;
}
window.onload=loadxml;
</script>
<div id="oa" style="font-size:9pt"></div>
--------------------
둘다 티스토리 / 테터(큐브)에만 넣으면 먹통이 되는데.. 왜그런걸까요 ㅠ_ㅠ
그.. skin.html 에다가 그냥 밀어넣었습니다만.. -_-;