I'vew just checked the CFTalk archives and it seems my repsonse got cut off,
perhaps its the way gmail writes its HTML or something. Anyway, as I was
saying, the CFLOOP version might look something like this:
<cfloop index = "VotedElement" list = "#FORM.vote#">
<cfset position = ListFind( FORM.allidslist, VotedElement )>
<cfif position>
<cfset FORM.allidslist = ListDeleteAt(FORM.allidslist,
position)>
</cfif>
</cfloop>
Dominic
On 05/07/07, Dominic Watson <[EMAIL PROTECTED]> wrote:
>
> Try this:
>
>
> <cfscript>
> > aVote = ListToArray(form.vote);
> > aAllIDs = ListToArray(form.allidslist);
> > aAllIDs.RemoveAll(aVote);
> > </cfscript>
> >
>
> And check this out if you want to know why it works:
>
> http://coldfused.blogspot.com/2007/01/extend-cf-native-objects-harnessing.html
>
>
> Alternatively, using the cfloop as you were doing, you were pretty much
> there. You might solve it like so:
>
> <cfloop index = "VotedElement" list = "#FORM.vote#">
> > <cfset position = ListFind( FORM.allidslist, VotedElement )>
> > <cfif position>
> > <cfset FORM.allidslist = ListDeleteAt(FORM.allidslist,
> > position)>
> > </cfif>
> > </cfloop>
>
> Dominic
>
>
>
> On 05/07/07, [EMAIL PROTECTED] <[EMAIL PROTECTED] >
> wrote:
> >
> > I've created a voting process, that displays the first 15 contest
> > entries. Now I want to
> > record which items were "voted on" and which ones were "not voted on" so
> >
> > that all first 15 aren't displayed again and the next 15 entries are
> > displayed for voting.
> >
> > here's what I have at the time i'm trying to do my cfloop...
> >
> > FORM PROCESSED: these are ids I have to work with once the voting has
> > been processed
> > voted: 21,22,23,24 or #FORM.vote#
> > all ids displayed on page 8,9,12,13,14,15,16,17,18,19,20,21,22,23,24 or
> > #FORM.allidslist#
> >
> > GOAL: I want to remove the "voted ids" from the "all ids display on
> > page" list.
> >
> > INCOMPLETE CODE:
> > <cfloop index = "VotedElement" list = "#FORM.vote#">
> > ListFind(FORM.vote, value, )
> >
> > <cfloop index = "ListElement" list = "#FORM.allidslist#">
> > ListDeleteAt(FORM.allidslist, position [, delimiters ])
> > </cfloop>
> > </cfloop>
> >
> >
> > Thanks
> >
> > D
> >
> >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
CF 8 â Scorpio beta now available,
easily build great internet experiences â Try it now on Labs
http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283040
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4