Advertisement
Guest User

Untitled

a guest
Nov 17th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function loadTable()
  2. {
  3.     var xhttp = new XMLHttpRequest();
  4.     xhttp.onreadystatechange = function()
  5.     {
  6.         if (this.readyState === 4 && this.status === 200)
  7.         {
  8.             //document.getElementById("statuses").innerHTML = this.responseText;
  9.             var table = this.responseText;
  10.             table.tr.forEach(console.log);
  11.         }
  12.     };
  13.     xhttp.open("GET", "get_table.php", true);
  14.     xhttp.send();
  15. }
  16.  
  17. window.onload = function ()
  18. {
  19.     loadTable();
  20.     setTimeout(loadTable, 10000);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement