converting numbers into alphabets
<p>I want to convert numbers into alpha characters using JavaScript.  For example, 01=n, 02=i 03=n, 04=a, etc.</p>

<p>When someone enters the numbers:01020304 in the form he will get the response: nina.  Whatever the user enters gets replaced with the equivalent characters including spaces. </p>

<h3>Update</h3>

<p>Thank you all for quick response. I have found this code in one site.  It converts alpha characters into numbers, but code for converting numbers into alpha characters isn't working. Here is the code for converting alpha characters into numbers: </p>

<pre><code>var i,j;
var getc;
var len;
var num, alpha;

num=new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17",
"18","19","20","21","22","23","24","25","26","00","##","$$");

alpha=new Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","
v","w","x","y","z"," ",".",",");

function encode() {
  len=document.f1.ta1.value.length;
  document.f1.ta2.value="";
  for(i=0;i&lt;len;i++) {
    getc=document.f1.ta1.value.charAt(i);
    getc=getc.toLowerCase();
    for(j=0;j&lt;alpha.length;j++) {
      if(alpha[j]==getc) {
        document.f1.ta2.value+=num[j];
      }
    }
  }
}
</code></pre>

<p>Can anyone show me how to convert this to do the opposite character conversion?</p>
