I've done something very similar to this (capturing Enter keypresses).
The things you have to be careful of - (1) pressing enter to submit a
form is very standard browser behavior - so if you change it you will
be (potentially) disrupting your users, (2) there are certain controls
where the enter key has existing functionality that you want to retain
(for example, textarea and select boxes).

That said, attaching an onkeyxxx event to every input element of the
appropriate type will allow you to trap the event and prevent form
submission. Remember to use the MochiKit preventDefault function,
because simply returning false will not prevent event bubbling in IE.

Hope that helps,
Peter


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to