FACT++  1.0
function refresh_text ( )

Definition at line 38 of file index.js.

References process_status(), and var().

Referenced by onload().

39 {
40  var xmlHttp = null;
41 
42  try { xmlHttp = new XMLHttpRequest(); }
43  catch(e)
44  {
45  try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }
46  catch(e)
47  {
48  try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); }
49  catch(e)
50  {
51  alert("Your browser doesn't support dynamic reload.");
52  return;
53  }
54  }
55  }
56 
57  xmlHttp.open('POST', 'status.txt', true);
58 
59  xmlHttp.onreadystatechange =
60  function ()
61  {
62  if (xmlHttp.readyState == 4)
63  {
64  if (xmlHttp.status==0)
65  {
66  setTimeout("refresh_text()", 3000);
67  return;
68  }
69  if (xmlHttp.status!=200)
70  {
71  alert("HTTP request error: "+xmlHttp.statusText+" ["+xmlHttp.status+"]");
72  setTimeout("refresh_text()", 10000);
73  /****** invalidate ******/
74  return;
75  }
76 
77  process_status(xmlHttp.responseText);
78  setTimeout("refresh_text()", 3000);
79  }
80  };
81 
82  xmlHttp.send(null);
83 }
po::typed_value< T > * var(T *ptr=0)
function process_status(result)
Definition: index.js:129

+ Here is the call graph for this function:

+ Here is the caller graph for this function: