If you come from a VB programming background, often you are left floundering when trying to retrieve character codes from a string or vice versa, trying to convert character codes into a string value when using Javascript.

The following two javascript functions are designed to mimic the more familiar Asc and Chr functions found in the VB language:

//returns numeric character code from string character
function Asc(String){
return String.charCodeAt(0);

//returns string character from numeric character code
function Chr(AsciiNum){
return String.fromCharCode(AsciiNum);

There, you should feel a tad more comfortable now.