I've never done much javascripting before but I took a whack at making an encrypter/decrypter like you describe above. Didn't take long, most frustrating was trying to find the functions for getting the character codes and reverse.
If you want to learn javascript the best way is just by having a crack at it. r2d2 posted a good link (w3schools) which is what I used.
Function for returning the actual character from ascii character
Code:
function charFromCharCode (charCode) {
return unescape('%' + charCode.toString(16));
}
Code:
Text = "hello world";
//below returns 7
acode = charCodeAt(1);
// line below returns h backs
achar = charFromCharCode(acode);
Bookmarks