Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: detecting paste in an event


Message #1 by "David Fisher" <dfisher@g...> on Thu, 4 Jul 2002 02:26:48
I have an <input type='text'> on a form. It's easy to detect when the
text is changed using an onkeypress or onkeyup event. I need to do
things the moment a change happens, not when the field loses focus
so onchange won't work. However, if someone clicks on the field and
then goes to the browser's Edit|Paste menu (instead of Ctrl-V)
it doesn't fire either the onchange or onkey... events.

So how do I detect that the user has pasted text into this field
using an event?

  Return to Index