|
|
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
function ajaxFunction(){ var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Your browser broke!"); return false; } } } return ajaxRequest; } function showData() { //alert("i m here"); htmlRequest = ajaxFunction(); if (htmlRequest==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request"); // Alert Them! return; // Returns. } // End If. htmlRequest.onreadystatechange = function(){ if(htmlRequest.readyState == 4){ document.getElementById("shoutarea").innerHTML = htmlRequest.responseText; var obj = document.getElementById('shoutarea'); obj.scrollTop = obj.scrollHeight; } } htmlRequest.open("GET", "index.php?mode=outputinfo", true); htmlRequest.send(null); } showData(); setInterval("showData()",1000); function showsData() { //alert("i m here"); htmlRequest = ajaxFunction(); if (htmlRequest==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request"); // Alert Them! return; // Returns. } // End If. htmlRequest.onreadystatechange = function(){ if(htmlRequest.readyState == 4){ document.getElementById("onlinearea").innerHTML = htmlRequest.responseText; var obj = document.getElementById('onlinearea'); obj.scrollTop = obj.scrollHeight; } } htmlRequest.open("GET", "index.php?mode=outputinfos", true); htmlRequest.send(null); } showsData(); setInterval("showsData()",1000); |
|
|
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
// JavaScript Document function ajaxFunction(){ var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Your browser broke!"); return false; } } } return ajaxRequest; } function showData() { //alert("i m here"); htmlRequest = ajaxFunction(); if (htmlRequest==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request"); // Alert Them! return; // Returns. } // End If. htmlRequest.onreadystatechange = function(){ if(htmlRequest.readyState == 4){ document.getElementById("shoutarea").innerHTML = htmlRequest.responseText; var obj = document.getElementById('shoutarea'); obj.scrollTop = obj.scrollHeight; } } htmlRequest.open("GET", "index.php?mode=outputinfo", true); htmlRequest.send(null); } showData(); setInterval("showData()",1000); |
|
|
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 |
function showsData() { var req; try { req = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { try{ req = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Your browser broke!"); return false; } } req.onreadystatechange = function() { if ((req.readyState == 4) && (req.status == 200)) { document.getElementById("onlinearea").innerHTML = req.responseText; var obj = document.getElementById('onlinearea'); obj.scrollTop = obj.scrollHeight; } } req.open("GET", "index.php?mode=outputinfos", true); req.send(null); } showsData(); setInterval("showsData()",1000); |
|
|
JavaScript Code |
1 2 |
req = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); |
|
|
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
function ajaxFunction() { var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Your browser broke!"); return false; } } } if (htmlRequest==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request"); // Alert Them! return false; // Returns. } // End If. return ajaxRequest; } function showData() { //htmlRequest = ajaxFunction(); var htmlRequest = ajaxFunction(); htmlRequest.onreadystatechange = function(){ if(htmlRequest.readyState == 4){ document.getElementById("shoutarea").innerHTML = htmlRequest.responseText; var obj = document.getElementById('shoutarea'); obj.scrollTop = obj.scrollHeight; } } htmlRequest.open("GET", "index.php?mode=outputinfo", true); htmlRequest.send(null); } function showsData() { //htmlRequest = ajaxFunction(); var htmlRequest= ajaxFunction(); htmlRequest.onreadystatechange = function() { if ((htmlRequest.readyState == 4) && (htmlRequest.status == 200)) { document.getElementById("onlinearea").innerHTML = htmlRequest.responseText; var obj = document.getElementById('onlinearea'); obj.scrollTop = obj.scrollHeight; } } htmlRequest.open("GET", "index.php?mode=outputinfos", true); htmlRequest.send(null); } showData(); showsData(); setInterval("showData()",1000); setInterval("showsData()",1000); |
|
|
JavaScript Code |
1 2 |
function showData() { var htmlRequest = ... |