was kann man da machen ??|
|
JavaScript Code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
var xmlHttp = false; try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { xmlHttp = false; } } if (!xmlHttp && typeof XMLHttpRequest != 'undefined') { xmlHttp = new XMLHttpRequest(); } loadData(); setInterval("loadData()",500); function loadData() { if (xmlHttp) { xmlHttp.open('GET', 'getdata.php', true); xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) { document.getElementById("content").innerHTML = xmlHttp.responseText; } }; xmlHttp.send(null); } } |
|
|
JavaScript Code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
try { var xmlHttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { var xmlHttp = false; } function loadData() { if (xmlHttp) { xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) document.getElementById("content").innerHTML = xmlHttp.responseText; }; xmlHttp.open('GET', 'getdata.php', true); xmlHttp.send(null); } } setInterval("loadData()",500); |


|
|
JavaScript Code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
var xmlHttp = false; try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { xmlHttp = false; } } if (!xmlHttp && typeof XMLHttpRequest != 'undefined') { xmlHttp = new XMLHttpRequest(); } loadData(); setInterval("loadData()",500); function loadData() { if (xmlHttp) { xmlHttp.open('GET', 'getdata.php', true); xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) { document.getElementById("content").innerHTML = xmlHttp.responseText; } }; xmlHttp.send(null); } } |
|
|
PHP Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
<?if(isset($_GET['x'])) die(''.rand(1,1000)); ?> <html> <head> <script type="text/javascript"> //<![CDATA try { var xmlHttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { var xmlHttp = false; } function loadData() { if (xmlHttp) { xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) document.getElementById("content").innerHTML = xmlHttp.responseText; }; xmlHttp.open('GET', 'ajax.php?x='+new Date().getMilliseconds(), true); xmlHttp.send(null); } } //]]> </script> </head> <body onload="loadData()"> <div id="content"></div> </body> </html> |
|
|
JavaScript Code |
1 |
xmlHttp.open('GET', 'getdata.php', true); |
|
|
JavaScript Code |
1 |
xmlHttp.open('GET', 'getdata.php?id='+Math.round(Math.random()*100000+1),true); |
|
|
JavaScript Code |
1 |
xmlHttp.open('GET', 'getdata.php?x='+new Date().getMilliseconds(), true); |
|
|
JavaScript Code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|