All pastes #927711 Raw Edit

Lakario

public html v1 · immutable
·published 2008-03-04 14:21 UTC
rendered paste body
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>        <title>AJAX Test</title>        <script type="text/javascript">            var xmlHttp = GetXmlHttpObject();                        function GetXmlHttpObject(){                var xmlHttp = null;                try {                    // Firefox, Opera 8.0+, Safari                    xmlHttp = new XMLHttpRequest();                }                 catch (e) {                    // Internet Explorer                    try {                        xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");                    }                     catch (e) {                        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");                    }                }                return xmlHttp;            }                        function queryDate(){				xmlHttp.onreadystatechange = function() { tempObj(xmlHttp, 'response'); }                xmlHttp.open("GET", 'http://localhost:8080/date.php?sID=' + new Date().getSeconds(), true);                xmlHttp.send(null);            }                        function tempObj(xmlHttp, containerID){                if (xmlHttp.readyState == 4) {                    var container = document.getElementById(containerID);                    if (container != null)                         container.innerHTML = xmlHttp.responseText;                }            }        </script>    </head>    <body>    	<span id="response" style="border: 1px solid black;">&nbsp;</span><br />		<input type="button" onclick="queryDate();" value="Get Date" />    </body></html>