So jetzt mal die Frage einfacher gestellt.
Also so sieht mein Code aus:
Code:
function loadData()
{
if (xmlHttp) {
xmlHttp.open('GET', 'select.php', true);
xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState == 4) {
var text = document.createTextNode(xmlHttp.responseText);
document.getElementById("chat").appendChild(text);
//document.getElementById("chat").innerHTML = xmlHttp.responseText;
}
};
xmlHttp.send(null);
}
}
Die ausgabe sieht so aus:
http://crkevin.cr.funpic.de/falsch.PNG
un so soll es aussehn:
Code:
function loadData()
{
if (xmlHttp) {
xmlHttp.open('GET', 'select.php', true);
xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState == 4) {
//var text = document.createTextNode(xmlHttp.responseText);
//document.getElementById("chat").appendChild(text);
document.getElementById("chat").innerHTML = xmlHttp.responseText;
}
};
xmlHttp.send(null);
}
}
http://crkevin.cr.funpic.de/richtig.PNG
Aber dann funktionierst ja nicht mehr so mit dem Knoten da...