Change this line:
  <cfif not ListFind(variables.SomeList, i)>

to:
  <cfif not ListFind(variables.SomeList, Mid(FORM.Username, i, 1))>

Otherwise you're looking for the numeric index in the looping sequence, not
the equivalent character in the form variable.

David

> -----Original Message-----
> From: Steve Martin [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 27, 2000 10:00 AM
> To: CF-Talk
> Subject: RE: Find character not in a list (reverse of FindOneOf).
>
>
> It's gonna be a little more extensive than that. The scenario is that we
> have a variable which contains n characters and a list which contains m
> elements. We need a function which returns true if one of the
> characters in
> the string does not occur in the list. For this we will have to loop over
> the string and compare each character.
>
> <cfset stopcondition=0>
> <cfloop from=1 to=Len(FORM.Username) index=i>
>       <cfif not ListFind(variables.SomeList, i)>
>               <cfset stopcondition=1>
>               <cfbreak>
>       </cfif>
> </cfloop>
>
> <cfif stopcondition>
>       Do your stuff here
> </cfif>
>
> Steve
>
>
> > -----Original Message-----
> > From: Deanna L. Schneider [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, October 27, 2000 15:03
> > To: CF-Talk
> > Subject: Re: Find character not in a list (reverse of FindOneOf).
> >
> >
> > er....listfind() function I mean.
> >
> > -d
> >
> >
> >
> > ************************************************************
> > Deanna Schneider
> > Interactive Media Developer
> > UWEX Cooperative Extension Electronic Publishing Group
> > 103 Extension Bldg
> > 432 N. Lake Street
> > Madison, WI 53706
> > (608) 265-7923
> >
> >
> >
> > ------------------------------------------------------------------
> > ------------------------------
> > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> > or send a message with 'unsubscribe' in the body to
> > [EMAIL PROTECTED]
> >
>
> ------------------------------------------------------------------
> ------------------------------
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> or send a message with 'unsubscribe' in the body to
> [EMAIL PROTECTED]
>

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to