I can't see the logic in the substitution, so I guess you would have to build your own object. If you want it with the leading zeroes...
Code:
<script type="text/javascript">
function copy_data(val){
var subs={"a":"001","e":"002","v":"008"}
var b = val[val.length-1];
document.getElementById("copy_to").value+=subs[b]
}
</script>
</head>
<body>
From:<input type="text" name ="a" id="copy_from" onkeyup="copy_data(this.value)"/><br>
To:<input type="text" name ="b" id="copy_to"/><br>
</body>
although you would want to have some sort of backup plan for what happens if somebody enters something that isn't one of those letters
Bookmarks