document.getElementById().value doesn't set the value
Your response is almost certainly a string. You need to make sure it gets converted to a number:
document.getElementById("points").value= new Number(request.responseText);
You might take a closer look at your responseText. It sound like you are getting a string that contains quotes. If you are getting JSON data via AJAX, you might have more consistent results running it through JSON.parse()
.
document.getElementById("points").value= new Number(JSON.parse(request.responseText));
According to my tests with Chrome:
If you set a number
input to a Number, then it works fine.
If you set a number
input to a String that contains nothing but a number, then it works fine.
If you set a number
input to a String that contains a number and some whitespace, then it blanks the input.
You probably have a space or a new line after the data in the server response that you actually care about.
Use document.getElementById("points").value = parseInt(request.responseText, 10);
instead.