I wonder if it has to do with the way cf does cfloop and cfoutput... have
you tried something like
<cfoutput query="getPages">
<form action="">
<select name="Status">
<cfloop query="getPageStatusTypes">
<option <cfif getPageStatusTypes.PageStatus EQ
getPages.status[getPages.currentRow]>SELECTED</cfif>></option>
</cfloop>
</select>
</form>
</cfoutput>
> -----Original Message-----
> From: Chad Gray [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 07, 2006 5:00 PM
> To: CF-Talk
> Subject: cfloop in a cfoutput
>
> I have run into this in the past, but never asked anyone why it occurred
> or if there is a better way of doing this.
>
> If I have a CFLoop inside of a CFoutput and inside the CFLoop I call a
> variable from the surrounding CFoutput query I get a blank.
>
> I have to set the variable as a local variable in order to use it in the
> CFLoop.
>
> Below does not work:
>
> <cfoutput query="getPages">
>
> <form action="">
> <select name="Status">
> <cfloop query="getPageStatusTypes">
> <option <cfif getPageStatusTypes.PageStatus EQ
> getPages.status>SELECTED</cfif>></option>
> </cfloop>
> </select>
> </form>
>
> </cfoutput>
>
>
> Below DOES work:
>
> <cfoutput query="getPages">
> <cfset localstatus = getPages.status>
>
> <form action="">
> <select name="Status">
> <cfloop query="getPageStatusTypes">
> <option <cfif getPageStatusTypes.PageStatus EQ
> variables.localstatus>SELECTED</cfif>></option>
> </cfloop>
> </select>
> </form>
>
> </cfoutput>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:259541
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4