@ Bryan, Scott, and Jason:
Oh, you guys are just smarty-pants!
After 2 days of wrestling with this entire functionality,
I had gotten it into an overly complicated state.
This works just fine:
<cfargument name = "images" type = "string" required =
"yes" />
<cfargument name = "listPosition" type = "string" required =
"yes" />
<cfset image = listGetAt(images, listPosition + 1) />
Thanks!
Rick
-----Original Message-----
From: Bryan Stevenson [mailto:[email protected]]
Sent: Friday, June 10, 2011 3:17 PM
To: cf-talk
Subject: Re: Why would this code return this error?
ARGUMENTS.images (the value of imagesList) is a string and not a query
valueList() is for making a list out of a column fomr a query
string <> query
error can not computer! ;-)
HTH
Cheers
On Fri, 2011-06-10 at 15:09 -0400, Rick Faircloth wrote:
> Hi, all...
>
> I've been trying to set up some CF/AJAX/CFC
> functionality and when it wasn't working as expected,
> re-coded to track variables through the functionality.
>
> All the variables have been showing up fine in alerts
> throughout.
>
> However, now at this point in the code:
>
> <cfargument name = "images" type = "string" required = "yes"
> />
> <cfargument name = "listPosition" type = "string" required = "yes"
> />
>
> <cfset imagesList = arguments.images />
> <cfset imagesList = valueList(imagesList) />
> <cfset image = listGetAt(imagesList, listPosition) />
>
> I'm getting this error:
>
> The ValueList() function has an invalid parameter: imagesList.
> Parameter 1 of function ValueList which is now imagesList
> must be pointing to a valid query name.
>
> Can anyone tell from just this much code what my problem is?
> Why "imagesList" isn't being accepted as a valid parameter or valid query?
>
> Thanks!
>
> Rick
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345153
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm