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="pack_size" query="get_all">
<cfset i= i+1>
//misc javascript here
<cfoutput group="in_volts" ><cfset q= q+1>//involts
//misc javascript here
<cfoutput group="out_volts" ><cfset x= x+1>//outvolts
//misc javascript here
//outcurr
arrayclear(outcurr_array)
<cfoutput >
<cfset outcurr_array[#ii#] ="#out_curr#">
<cfset outcurr_array[#ii#][1] = #part_num#>
<cfset outcurr_array[#ii#][1][1] = #dateformat(rev_date,"mm/dd/yyyy"
#>
<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.
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="pack_size" query="get_all">
<cfset i= i+1>
//misc javascript here
<cfoutput group="in_volts" ><cfset q= q+1>//involts
//misc javascript here
<cfoutput group="out_volts" ><cfset x= x+1>//outvolts
//misc javascript here
//outcurr
arrayclear(outcurr_array)
<cfoutput >
<cfset outcurr_array[#ii#] ="#out_curr#">
<cfset outcurr_array[#ii#][1] = #part_num#>
<cfset outcurr_array[#ii#][1][1] = #dateformat(rev_date,"mm/dd/yyyy"
<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.