View Full Version : get key symbol / ascii character on keypress

09-22-2004, 11:11 AM
Hey guys,

I've already got the code working to return the ASCII key code on key press, but what I need to do is to strip characters from a string based on the ASCII code.... eg:

var abvKey = 92 ("\");

if (string.search(xxxxxxxx))

above I need to then say if the string has a "\" in, return true. I cant hard code this as the user could change the abvKey to any ASCII value. So how to I say to the code compare the ASCII "92" to the string....?

thanks for any help :)