"Peter Mularien" <[EMAIL PROTECTED]> writes:

> 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).

Thanks for reminding me that, Peter...  Indeed, I'll want to preserve the
Enter behavior in some places.  And I want to change the behavior of
submitting the form by users demand, this is the intention of this action. 

> 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.

Yes, thanks.  I'll use that.  This was a nice reminder as well. :-)



Be seeing you,
-- 
Jorge Godoy      <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
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