By Dina Hess
| Title: | New at Structures |
| Date: | 05/17/04 (2 Posts) |
| Summary: | Need to reference a dynamic structure key? Try using array syntax, like this: |
|
<cfset items["qty#countlist#"] = ...>
|
|
| Title: | CFSCRIPT and Methods |
| Date: | (05/17/04) 3 Posts |
| Summary: | How would you call a CFC method inside a CFSCRIPT block? Try this: |
|
<cfscript>
obj = createObject("component", "path.to.component"); obj.init(application.dsn); imageList = obj.getImageListForSite(attributes.siteID); </cfscript> |
|
| Title: | Array Question |
| Date: | 05/17/04 (4 Posts) |
| Summary: | Here's an example of how to append new data to a two-dimensional array: |
|
<cfset arrayLength=arrayLen(session.item)>
<cfset session.item[variables.arrayLength+1][1]=form.qty> <cfset session.item[variables.arrayLength+1][2]=form.item> <cfset session.item[variables.arrayLength+1][3]=form.priceeach> |
|