I think you want this:

imageList = valueList(testSQL.contactID);
listRandImage = randRange(listFirst(imageList), listLast(imageList));
findImagePos = listFind(imageList, listRandImage);
imageList = listDeleteAt(imageList, findImagePos);

However, that being said, I'm totally perplexed as to what you're
trying to do.  It seems like you ought to be using something like
this:

imageList = valueList(testSQL.contactID);
findImagePos = randRange(1, listLen(imageList));
imageList = listDeleteAt(imageList, findImagePos);

cheers,
barneyb

On Wed, 20 Oct 2004 18:13:58 -0400, Phillip Perry
<[EMAIL PROTECTED]> wrote:
> OK I wrote this email 10 times trying to word it right. All I want to know
> is how to delete an ImageID from the list after it is displayed on the
> browser using the following variables.
> 
> <cfset ImageList = "#ValueList(testSQL.contactID)#"/>
> <cfset MaxListLen = #ListLen(ImageList)#>
> <cfset ListRandImage =
> "#RandRange(ListFirst(ImageList),ListLast(ImageList))#"/>
> <cfset FindImagePos = #ListFind(ImageList,ListRandImage)#>
> <cfset NewImageList = #ListDeleteAt(ImageList , ListRandImage)#>
> <cfset ImageList = NewImageList>
> 
> I'm so close but I cant get the ListLen to get smaller.
> 
> Any help is much appreciated,
> 
> Phil
> 
> 
-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/blog/

I currently have 2 GMail invites for the taking

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Sams Teach Yourself Regular Expressions in 10 Minutes  by Ben Forta 
http://www.houseoffusion.com/banners/view.cfm?bannerid=40

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182093
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to