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