The URL scope is stored as a structure.  You can use cfloop to loop over a
collection of the variables.  For example:


<cfset url.task1 = 1>
<cfset url.task2 = 2>
<cfset url.task3 = 1>
<cfset url.dog = "dog">


<cfloop collection="#url#" item="key">
 <cfif FindNoCase("task",key)>
  <cfoutput>#key# : #url[key]#<br /></cfoutput>
 </cfif>
</cfloop>
This code will only output any URL variable that has the word task in it no
matter how many their are.

Makes sense?

Teddy

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.cfmpage             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:258889
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to