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
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283018
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to