You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Edward Elhauge <ee...@uncanny.net> on 2008/01/11 19:52:34 UTC
keypress events
Hi,
I would like some guidance on what the best way is to attach an 'onkeypress'
event handler to a Cocoon CForm Widget?
My use case is that I want to set a 'form dirty' flag as users type
data into my forms. I've been using the 'fd:on-value-changed' handler
for that purpose but it doesn't catch the case where a user types
data into a field and then directly clicks on a button that would
exit the Web page.
I can envision a solution using onkeypress and JavaScript.
I'm using Cocoon 2.1.8 but I'd be willing to upgrade if that would
provide for a cleaner solution.
Yours,
Ed Elhauge
--
Edward Elhauge <ee...@uncanny.net>
"The right dose differentiates a poison and a remedy." -- Paracelsus (1493 - 1541)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: keypress events
Posted by Tobia Conforto <to...@linux.it>.
Edward Elhauge wrote:
> I would like some guidance on what the best way is to attach an
> 'onkeypress' event handler to a Cocoon CForm Widget?
> My use case is that I want to set a 'form dirty' flag as users type
> data into my forms. I've been using the 'fd:on-value-changed'
> handler for that purpose but it doesn't catch the case where a user
> types data into a field and then directly clicks on a button that
> would exit the Web page.
I've been having a similar problem:
- text field (product quantity) with on-change that triggers update of
the totals
- on-change fires only when the user leaves the text field
- if the user jumps directly to the submit button, the two ajax
requests collide and bad things happen (mostly the change to the text
field is lost, but I've seen errors too)
I haven't solved it yet.
Tobia
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org