View Full Version : Deleting the first right letter in a textbox

12-16-2007, 03:59 AM
Hey all im trying to just delete the last letter on the right side of a textbox. I am trying to do this via onclick for a backspace button. Does anything have code for this or know what i can search for because i come up with nothing everything i try.

This is what i us to add to the textbox:

onclick="document.frmFB.txtFName.value=document.frmFB.txtFName.value + '@';"

And this is what i've tryed to get it to delete the last letter:

onclick="txtFName.Select(txtFName.SelectionStart - 1, 1)"

Any help would be great! :)

12-16-2007, 07:08 AM
RegExp (http://lawrence.ecorp.net/inet/samples/regexp-intro.php) is your friend: