There are a few problems here. First, your line here:

<cfset ListRandImage =
"#RandRange(ListFirst(ImageList),ListLast(ImageList))#"/>

This will not work right. If your list is 4, 10, 20, then you will do

randRange(4,20)

which could return, let's say, 16, which doesn't even exist in your
list. What you want is

<cfset ListRandImage = randRange(1, maxlistlen)/>

Then you can get the image you would use listGetAt, and then
listDeleteAt to remove it.

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

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the mailserver that powers this list at 
http://www.houseoffusion.com/banners/view.cfm?bannerid=17

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182094
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