summaryrefslogtreecommitdiff
path: root/ws2a/bugsload.js
blob: 1212e151e12833dc20a5d9ba8f0887532cfe51e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function htmlEscape(str) {
    return String(str)
        .replace(/&/g, '&')
        .replace(/"/g, '"')
        .replace(/'/g, ''')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/\//g, '&#x2F;');
}

function loadLastBugs() {
  var xhttp = new XMLHttpRequest();
  xhttp.onreadystatechange = function() {
    if (xhttp.readyState == 4 && xhttp.status == 200) {
     document.getElementById("bugstable").innerHTML = htmlEscape(xhttp.responseText);
    }
  };
  xhttp.open("GET", "/cgi-bin/bugsdata.cgi", true);
  xhttp.send();
}
window.onload = loadLastBugs