function $(id) {
    return document.getElementById(id);
}
 
window.onload = function() {
   getHttpRequest();
}

function getHttpRequest() {
   
    var xmlhttp = null;
    // Mozilla
    if (window.XMLHttpRequest) {
        xmlhttp = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
   
    xmlhttp.open("GET", '/bestandene_pruefungen.php', true);
    xmlhttp.onreadystatechange = function() {
//        if(xmlhttp.readyState != 4) {
//            $('bestandene_pruefungen').innerHTML = 'Seite wird geladen ...';
//        }
        if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            $('bestandene_pruefungen').innerHTML = xmlhttp.responseText;
        }
   }
    xmlhttp.send(null);
}

