updated with 'ready' trick to workaround windows scope reset
[xynt.git] / web / winstream.php
index f083907..e2b5ec6 100644 (file)
@@ -2,23 +2,18 @@
 <head>
 <script type="text/javascript" src="xynt/xynt-commons.js"></script>
 <script type="text/javascript" src="xynt/xynt-console.js"></script>
+<script type="text/javascript" src="xynt/xynt-http-streaming.js"></script>
 <script type="text/javascript"><!--
-     var allmythings="BEGIN";
-     var ifra;
+var allmythings="BEGIN";
 
-function check_and_set() {
-    $('cont').innerHTML = allmythings;
-    // console.log(allmythings);
+window.onload = function () {
+    var hs;
+    
+    hs = new http_streaming(document);
+    hs.start('winstream_rd.php');
 }
- window.onload = function () {
-     ifra = document.createElement("iframe");
-     ifra.style.visibility = "hidden";
-     document.body.appendChild(ifra);
-     ifra.contentWindow.location.href = 'winstream_rd.php';
-     setInterval(check_and_set, 500);
- }
-
-     //-->
+    
+//-->
 </script>
 <body>
 <div id="cont">INIT</div>