If you are trying to shift all ascii codes of the symbols by one then your attempt to do it is not very good. Look at this code http://jsfiddle.net/AHgZq/
$('#in').keyup(function(){
var val = $(this).val(), newval = '';
for(var i=0; i<val.length; i++)
{
newval += String.fromCharCode(val.charCodeAt(i)+1);
}
$('#out').val(newval);
});
On any letter entered in the input with id='in' it takes the whole string, takes every letter in it. Gets the ASCII code of it with function charCodeAt, increases it by one and converts back to ASCII symbol with the help of fromCharCode function. After that it sets the value of input with id='out' to that shifted string. Sample code uses jQuery for the fast access to the elements, but does not require it in general.
Or you can do it with regexp
http://jsfiddle.net/8sMvg/1/
$('#in').keyup(function(){
var val = $(this).val(), newval = '';
newval = val.replace(/(\w)/g,
function(match,group){
return String.fromCharCode(match.charCodeAt(0)+1);
});
$('#out').val(newval);
});
With respect to your code it will look like
function testResults (form) {
var TestVar = form.inputbox.value;
var NewVar = TestVar.replace(/(\w)/g,
function(match){
return String.fromCharCode(match.charCodeAt(0)+1);
});
alert ("Replaced text: " + NewVar);
}