Use structKeyExists(); it's neater and it can perform better.

Also, the evaluate()s are unnecessary. This;

<cfset variables.ga_del_type_id="form.ga_del_type_id#Evaluate(LoopCount)#">
<cfset variables.ga_del_type_id="#Evaluate(variables.ga_del_type_id)#">

is an unnecessarily complicated way of doing

<cfset variables.ga_del_type_id= form[ga_del_type_id & LoopCount]>

which is far more readable.

You could also avoid the whole isdefined/structkeyexists issue by
looping directly through the form struct as a collection.

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/



2009/1/25 Jason Congerton <[email protected]>:
> Hi
>
> Can't believe I've been such a numpty, the isdefined statement I was trying 
> had an error in the format missing bracket!! Corrected the bracket issue, 
> works fine...
>
> <cfif IsDefined("form.wp_delivery_active#Evaluate(LoopCount)#")>
> <cfset 
> variables.wp_delivery_active="form.wp_delivery_active#Evaluate(LoopCount)#">
> <cfset 
> variables.wp_delivery_active="#Evaluate(variables.wp_delivery_active)#">
> <cfelse>
> <cfset variables.wp_delivery_active="no">
> </cfif>
>
> Kind Regards
>
> Jason
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318483
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