Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>SBRF ACARS</title>
- <script language="Javascript">
- function xmlhttpPost(strURL) {
- var xmlHttpReq = false;
- var self = this;
- // Mozilla/Safari
- if (window.XMLHttpRequest) {
- self.xmlHttpReq = new XMLHttpRequest();
- }
- // IE
- else if (window.ActiveXObject) {
- self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
- }
- self.xmlHttpReq.open('GET', strURL, true);
- self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
- self.xmlHttpReq.onreadystatechange = function() {
- if (self.xmlHttpReq.readyState == 4) {
- updatepage(self.xmlHttpReq.responseText);
- }
- }
- }
- function updatepage(str){
- xmlhttpPost("/cgi-bin/simple-ajax-example.sh");
- xmlHttpReq.send();
- document.getElementById("result").innerHTML = str;
- }
- setInterval(updatepage, 1000);
- </script>
- </head>
- <body>
- <p>Irrelevant text</p>
- <div id="result"></div>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement