Hello!
I would like to ask somebody how i can determine what key was pressed in a textarea
....
need to write a little javascript code.. a user type in a textarea
and i need to write it in a while he writing so the keydown
, keypress
event handle this functionality, also need to change the text color if a user typed a "watched" word (or the word what he wrote contains the "watched" word/words ) in the textarea
.. any idea how i can handle it ??
till now did the text is appear in the <div>
, but with this i have a problem.. can't check if the text is in the "watched"... the document.getElementById('IDOFTHETEXTAREATAG');
on keypress
is not really works because i got back the whole text inside of the textarea
.....
So how i can do it ? any ideas ??? "(Pref. in Mozilla FireFox)