<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>foobar</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<script type="text/javascript">
var request;
function createXMLHttpRequest() {
var req;
try {
if(window.ActiveXObject) {
for(i = 5; i; i--) {
try {
if(i == 2) {
req = new ActiveXObject( "Microsoft.XMLHTTP" );
} else {
req = new ActiveXObject( "Msxml2.XMLHTTP." + i + ".0" );
}
break;
} catch(e) {
req = false;
}
}
} else if(window.XMLHttpRequest) {
req = new XMLHttpRequest();
if(req.overrideMimeType) {
req.overrideMimeType('text/xml');
}
}
} catch(e) {
req = false;
}
return req;
}
function getData(url) {
if(request && request.readyState){
request.abort();
request = false;
}
request = createXMLHttpRequest();
request.open('GET', url, true);
request.onreadystatechange = function() {
if(request.readyState == 4 && request.status == 200) {
alert(request.responseText);
}
}
request.send(null);
}
</script>
</head>
<body onload="getData('deine_file.txt');">
foo
</body>
</html>