When I use String.fromCharCode to directly convert Unicode values to characters it works. THIS WORKS alert(String.fromCharCode(104,116,116,112,58,47,47,119,119,119,46,103,111,111,103,108,101,46,99,111,109)); Code (markup): But if I want to put the Unicode values in a variable, then convert the variable to characters, it doesn't work. THIS DOESN'T WORK var mylink="104,116,116,112,58,47,47,119,119,119,46,103,111,111,103,108,101,46,99,111,109"; alert(String.fromCharCode(mylink)); Code (markup): Why? How can I make String.fromCharCode work with a variable?
var mylink="104,116,116,112,58,47,47,119,119,119,46,103,111,111,103,108,101,46,99,111,109"; var convertlist = mylink.split(","); finalstring = String.fromCharCode.apply(this,convertlist); alert(finalstring); Code (markup):
Thanks Jan, tested and working I spent about an hour trying to solve it. I knew the problem had something do to with String.fromCharCode only accepting numbers, but just couldn't get anything working. +REPZ