var questionsets=null; var currentlyEditing=null; function getQuestionSets(){ var xhr=new XMLHttpRequest(); xhr.onreadystatechange=function(){ if(xhr.readyState==4){ questionsets=JSON.parse(xhr.responseText); updateQuestionSetsList(); } }; xhr.responseType="text"; xhr.open("GET","/zelfoverhoor/docent/sets"); xhr.send(); } function updateQuestionSetsList(){ var tbody=document.getElementById("qsets"); clearElement(tbody); if(questionsets.length==0){ var tr=document.createElement("tr"); var td=document.createElement("td"); td.appendChild(document.createTextNode("Nog geen vragensets...")); td.setAttribute("colspan","4"); tr.appendChild(td); tbody.appendChild(tr); } for(var i=0;i