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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array Error

Status
Not open for further replies.

TechDude

Programmer
Jul 20, 2000
62
US
Hi, I am attempting to create and populate a multi-dimensional array within a set of grouped cfoutputs.
I am getting the followiung error

Cannot set element of indexed object

The element at position 0 of the object cannot be set. May be the object is read-only. The object has elements in positions 1 through 0.

any idea why i'm getting this error?

the code is

<cfset outcurr_array = ArrayNew(3)>
<cfoutput group=&quot;pack_size&quot; query=&quot;get_all&quot;>
<cfset i= i+1>
//misc javascript here
<cfoutput group=&quot;in_volts&quot; ><cfset q= q+1>//involts
//misc javascript here
<cfoutput group=&quot;out_volts&quot; ><cfset x= x+1>//outvolts
//misc javascript here
//outcurr
arrayclear(outcurr_array)
<cfoutput >
<cfset outcurr_array[#ii#] =&quot;#out_curr#&quot;>
<cfset outcurr_array[#ii#][1] = #part_num#>
<cfset outcurr_array[#ii#][1][1] = #dateformat(rev_date,&quot;mm/dd/yyyy&quot;)#>
<cfset ii= ii+1>
</cfoutput>
<cfloop>
do something in javascript with outcurr_array here
</cfloop>
</cfoutput>
)
<cfif q eq #in_volts_count#>)<cfelse>,</cfif>
</cfoutput>
<cfif i eq #pack_counter#>);}<cfelse>,</cfif>
</cfoutput>

Chris Sorel
chris@exnihilo.com
Remember, If you continue to do what you have always done,

you will continue to get what you have always gotten.
 
never mind... i figured it out...

Chris Sorel
chris@exnihilo.com
Remember, If you continue to do what you have always done,

you will continue to get what you have always gotten.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top