<input type="text" name="r1" id="r1_input" onchange="send(this);">
function send(referer) {
var id= referer.id;
var value = document.getElementById(id).value;
nocache = "&nocache=" + Math.random() * 1000000;
var request = new XMLHttpRequest();
request.onreadystatechange = function () {
if (this.readyState === 4) {
if (this.status === 200) {
if (this.responseText !== null) {
}
}
}
}
request.open("GET", "var"+id +"?"+value+"?"+ nocache, true);
request.send();
}