cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Larson <...@keow.org>
Subject Re: v2 Form.js how does onValidate work?
Date Thu, 18 Mar 2004 14:37:59 GMT
On Thu, Mar 18, 2004 at 02:33:51PM +0000, Tim Larson wrote:
> On Wed, Mar 17, 2004 at 02:31:53PM -0800, Christopher Oliver wrote:
> > Tim Larson wrote:
> > >On Wed, Mar 17, 2004 at 11:18:35AM -0800, Christopher Oliver wrote:
> > >>Tim Larson wrote:
> > >>>On Tue, Mar 16, 2004 at 09:16:38PM +0000, Tim Larson wrote:
> > >>> var userErrors = 0;
> > >>> this.formWidget_.validationErrorListener = function(widget, error)
{
> > >>>     if (error != null) {
> > >>>         userErrors++;
> > >>>     }
> > >>> }
> >
> My new question is why we set the validationErrorListener function
> pointer every time we go through the loop instead of just once.
> Is this to protect against the possibility of the user's flowscript
> messing with the pointer?

Answering myself: this is probably so we can pick up the brand new
instance of the variable "userErrors" to use in the function, right?

--Tim Larson

Mime
View raw message