<cfif isDefined("URL.task#i#")> or <cfif structKeyExists(URL, "task#i#")>
On 11/2/06, Richard White <[EMAIL PROTECTED]> wrote:
> hi, i have a page that submits values to a form as follows:
>
> var sendString = "rowNum=" + taskGrid.getRowsNum();
> for (i=1;i<=taskGrid.getRowsNum();i++)
> {
> sendString = sendString + "&Task" + a +"=" + taskGrid.cells(i,
> 1).getValue();
> a++;
> }
>
> (new Image()).src = "updater.cfm?" + sendString;
>
> Therefore the update.cfm page will recieve:
>
> url.Task1 = ...
> url.Task2 = ...
> url.Task3 = ...
> etc...
>
> and will contain x amount of tasks in the url variable dependant on how many
> rows there are in the grid
>
> The problem i am having is that i want to reference them in the update.cfm
> page like this
>
> <cfloop index="i" from="1" to="#url.rowNum#">
> <cfif isdefined("url.Task" & i)/>
> </cfif>
> </cfloop>
>
> but it keeps giving me an error as it isnt recocognising isdefined("url.Task"
> & i)
> of course if i change this to isdefined("url.Task1") then it works fine.
>
> is there are way that i can concertanate the url.Task with the value of i and
> access the url.Task1
>
> i would appreciate any help with this
>
> thanks
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258885
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4