--- googlecode.com/svn/trunk/public_html/stream.html 2008/04/17 20:03:54 61 +++ googlecode.com/svn/trunk/public_html/stream.html 2009/01/19 11:19:41 64 @@ -14,10 +14,13 @@ } function newXmlHttp() { - try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {} - try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} - try { return new XMLHttpRequest(); } catch(e) {} - return null; + var xhr = null; + try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { + try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { + try { xhr = new XMLHttpRequest(); } catch(e) { return false } + } + } + return xhr; } function startstream() { @@ -39,6 +42,7 @@ } } streamreq.send(null); + parent.Meteor.lastrequest = parent.Meteor.time(); } function extractEvents(responsestr) { @@ -65,9 +69,9 @@ } } - - -startstream(); +window.onload = function() { + if (parent.Meteor.status == 4) startstream(); +} \ No newline at end of file