How-To: Capture ‘return key’ from a field with Protoype.js
Feb.25, 2008 in
Tech
Prototype provides an excellent abstraction mechanism for event handling in javascript. I needed to capture when a user hit the ‘return key’ inside a text box, and then perform a specified action. Using the observe function and the KEY_RETURN constant, you can easily detect when this is done.
Simply place the following [...]
