last time i checked ascii A == 65 & a == 97… etc.
0-9 are the problem—zero-pad them; you're always dealing with two numbers for each position then e.g.
78AF01 => 070865700001
build it as a string then parseint it
leading zero will probably be an issue if the field is indeed purely numeric; check the length on retrieval—if it's short add it/them back when before deserializing
why the fuck you would want to do it in javascript is beyond me though, this is for your server-side language to deal with (which may have a serializer that does just this—although i've never come across any that serializes just to numeric [off to check :P])
*ok scratch the bit about why javascript, im too lazy to edit it out
__________________meh.