Hi Leute,
Ich habe keine Frage, ich möchte nur mein kleines Ajax-Framework zur Verfügung stellen.
Es eignet sich für die meisten Einsatzzwecke, wer andere Funktionen benötigt, kann es sich ja abändern 
ajax.js, welche das Framework enthält:
function Ajax(meth, url, func) {
    if (window.XMLHttpRequest) { // IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp = new XMLHttpRequest();
    } else { // IE6, IE5
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            if(typeof func == 'function') { func(xmlhttp.responseText); }
        }
    }
    xmlhttp.open(meth, url, true);
    return xmlhttp;
}
Anwendung:
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>Test</title>
<script src="js/ajax.js"></script>
</head>
<body>
<p id="output"></p>
<script type="text/javascript">
var a = new Ajax("GET", "text.txt", function(x) {
    document.getElementById("output").innerHTML = x;
});
a.send();
</script>
</body>
</html>
Vielleicht hilft es manchen Leuten weiter
