Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 4881 invoked from network); 14 Oct 2004 11:13:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Oct 2004 11:13:58 -0000 Received: (qmail 37729 invoked by uid 500); 14 Oct 2004 11:13:42 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 37656 invoked by uid 500); 14 Oct 2004 11:13:41 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 37634 invoked by uid 99); 14 Oct 2004 11:13:40 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of philipp.rech@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 14 Oct 2004 04:13:37 -0700 Received: (qmail 28813 invoked by uid 0); 14 Oct 2004 11:13:34 -0000 Received: from 53.122.197.194 by www54.gmx.net with HTTP; Thu, 14 Oct 2004 13:13:34 +0200 (MEST) Date: Thu, 14 Oct 2004 13:13:34 +0200 (MEST) From: "Philipp Rech" To: users@cocoon.apache.org MIME-Version: 1.0 References: <416E3D4F.6090405@schaubroeck.be> Subject: Re: CForms: immediate validation of input fields X-Priority: 3 (Normal) X-Authenticated: #1715056 Message-ID: <6830.1097752414@www54.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N thank you guys! that helped a lot. the works fine too. thank you for that hint! so i guess there can be a 3-level validation (used seperate OR together): 1- client-side via custom javascript through 2- server-side both, the widget validation AND the fd:javascript stuff 3- application level in the database (or simular applications) right? regards, philipp > I think that they were aiming to support more browsers by leaving most > actions on the server-side. Validation on server-side or client-side is, > in the end, a difference of opinion as you said. So you're right to > suggest a mechanism to choose between both. Like an attribute defining > "client-side" or "server-side" on each widget, and one default setting. > It's not there yet and I don't know if the developers are already > discussing/implementing this issue. > > Kind Regards, > Jan > > Gunter D'Hondt wrote: > > > CForms still doesn't have any clientside validations, which in my > > opinion is currently a huge disadvantage coz now you have to declare > > the specifications (datatype, required, format) in the form definition > > and again in your own clientside javascript stuff. It would be perfect > > that the CFormTemplateTransformer could automatically create those > > clientside javascript pieces or at least give a javascript-structure > > with the metadata of each field in it. > > > > Regards, > > > > Gunter D'Hondt. > > > > > > > > > > *Jan Hoskens * > > > > 14-10-2004 10:17 > > Please respond to > > users@cocoon.apache.org > > > > > > > > To > > users@cocoon.apache.org > > cc > > > > Subject > > Re: CForms: immediate validation of input fields > > > > > > > > > > > > > > > > > > > > If I am correct, all stuff happens server-side. The fd:javascript will > > happen at the same moment as the other validations (meaning sever-side, > > on-submit). If you really want to have a client-side validation, you > > can try to set some extra stuff in your template: > > > > > > > > The fi:styling attributes that are not used by the cform stylesheets > > will be copied into your html input element (ending up with > onchange=""/>). So you can set a javascript piece in which you validate > > your field in those attributes. > > > > Kind Regards, > > Jan > > > > Jorg Heymans wrote: > > > > > fd:javascript should be your friend here i think. > > > > > > http://cocoon.apache.org/2.1/userdocs/forms/validation.html > > > > > > Philipp Rech wrote: > > > > > >> Hello Cocooners! > > >> > > >> I have a CFrom with many fields and other input elements. Validation > > >> (based > > >> on the Cforms validation tags) happens when i submit the form. So > > far so > > >> good. Now is it possible (and how) to have Cforms validate user > > >> inputs right > > >> away after one field is filled out? So can I call the validation not > > >> only on > > >> submit but also when the user focuses (clicks on) the next field on > the > > >> page? Maybe through the Javascript "onBlur" event handler? > > >> > > >> Thank you in advance! > > >> philipp > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > > > For additional commands, e-mail: users-help@cocoon.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > > For additional commands, e-mail: users-help@cocoon.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org