tags:

views:

22

answers:

1

An odd request, I know. I want Javascript to pretend the user just pressed the backspace.

That's all I really want, if you want more info: My last topic here, gives more explaination. In short: I press a key, javascript converts the key to the greek equivalent, then puts that key in instead. The problem is, when onKeyUp is activated, it starts a function which looks for combinable character pairs put together (for accents) and inserts that key.

A: 

Backspace example:

if (document.getElementById("text").value.length > 0)
{
    document.getElementById("text").value=document.getElementById("text").value.substring(0,document.getElementById("text").value.length-1);
}
Secko
I need it to specifically emulate a keypress event.
DavidR