I’ve got a textarea, and when it changes, I’d like a function to be called.
However, the standard onchange event fires after the focus leaves the textarea. What I really want is for the even to fire as soon as the user begins typing.
I could bind onkeypress, but that doesn’t handle, say, pasting text into the textarea with the mouse. Plus it fires for Tab and other non-changing keypresses.
Is there a better solution?
You could add a
Edit: Aah, too quick. I did not see the “on mouse paste”.
Edit 2:
Example from: http://bytes.com/topic/javascript/answers/703623-capturing-event-when-user-right-click-paste-into-text-box