Thanks Joe for your quick respons, you helped me a great deal! I only had to add a trim function, and it works like a buzz now!
function trim(str)
{
return str.replace(/^\s*|\s*$/g,"");
}
function handleHttpResponse() {
if (http.readyState == 4) {
// Put returned values in array
results = http.responseText.split("|");
// construct variable en assign value to it
var vtag = document.getElementById("tag" + trim(results[0]));
if (vtag) vtag.innerHTML = results[1]
}
}
http://www.webchemie.nl