Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ArraytoList Problem

Status
Not open for further replies.

Zooo

Programmer
Nov 7, 2000
19
CA
I am passing a javascript variable that has a string of check box names separated by a comma into a Cold Fusion array. No problems.

When I try to separate that array in to a list I get an error.

"Parameter 1 of function ArrayToList which is now "f_001" must be an indexed object such as an array or a query column"

Anyone have any ideas? Any help much appreciated.
 
Hey Zoo,

It sounds like you're passing a string instead of an object. If the array you're converting is called myArray, the code should be like this.

<cfset myList=ArrayToList(myArray)>

It sounds to me like you're code is instead setup like this.

<cfset myList=ArrayToList(&quot;myArray&quot;)>

The difference is that when you surround the name with quotes, you're passing a string. Without the quotes, you're passing the object named myArray.

I may be off on this one but without seeing your code, this is the only thing I can guess would be wrong.

Hope this helps,
GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top