<html>
<head>
<script language="JavaScript"
type="text/javascript">
// <![CDATA[
var OBJEKT = null;
var file = null;
if (window.XMLHttpRequest) {
OBJEKT = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
OBJEKT =
new ActiveXObject("Msxml2.XMLHTTP");
} catch (ex) {
try {
OBJEKT =
new ActiveXObject("Microsoft.XMLHTTP");
} catch (ex) {
}
}
}
function DatenAusgeben() {
if (OBJEKT.readyState == 4) {
var d = document.getElementById("Daten");
d.innerHTML += OBJEKT.responseText;
if (location.hash != "#" + escape(file)) {
location.hash = "#" + escape(file); // Dateiname einfügen
}
}
}
function ladeDaten() {
if (OBJEKT.readyState < 4) {
OBJEKT.abort();
}
file = "daten.txt";
OBJEKT.open("GET", file);
OBJEKT.onreadystatechange = DatenAusgeben;
OBJEKT.send(null);
}
window.onload = function() {
if(location.hash.length > 1) {
file = unescape(location.hash.substring(1));
ladeDaten();
}
}
window.setInterval(
function() {
if (location.hash.length > 1 &&
location.hash != "#" + escape(file)) {
file = unescape(location.hash.substring(1));
ladeDaten();
} else if (location.hash.length <= 1 &&
document.getElementById("Daten").innerHTML != "Daten vom Server: ") {
location.reload();
file = null;
}
with (window.frames["loader"].window.location) {
if (search != "?" + escape(location.hash.substring(1)) &&
window.ActiveXObject) {
search = "?" + escape(location.hash.substring(1));
}
}
},
250
);
// ]]>
</script>
</head>
<body>
<p id="Daten">Daten vom Server: </p>
<form action="">
<p>
<input type="button" value="Anfrage senden" onclick="javascript:ladeDaten()">
</p>
</form>
<iframe src="Link-Loader.html" name="loader" style="display:none"></iframe>
</body>
</html>
<html>
<head>
<script type="text/javascript">
<!--
if (window.ActiveXObject &&
"?" + top.location.hash.substring(1) != unescape(location.search)) {
top.location.hash = unescape(location.search.substring(1));
top.ladeDaten;
}
//-->
</script>
</head>
<body>
</body>
</html>Ajax ermoeglicht spannende Effekte !!!
Zeile von rechts (hinten) nach links (vorne) nach einem Wert durchsuchen
Olli1981 16.04.2007 - 106 Hits - 2 Antworten
Ajax reload
webweber 15.04.2007 - 265 Hits - 1 Antwort
Formatierungsbroblem beim Anzeigen von Datein mittels AJAX
Klaus1 22.05.2007 - 60 Hits - 12 Antworten
AJAX geht net
Fassy91 14.08.2007 - 31 Hits - 12 Antworten
Wie funktioniert die Wiederholungsspalte (Beispiel)
Werner9502 29.05.2008 - 24 Hits - 3 Antworten