I bet if you take a closer look at your array then you'll find that it is
the _data_ in the Array that is wrong....

eg the following array will do what you describe....:

<CFSET mything1 = "1">
<CFSET mything2 = "Pneumologie">
<CFSET mything3 = "1">

<cfset ArticleSpecialities = ArrayNew(2)>

<cfset ArticleSpecialities[1][1] = "<cfoutput>#mything1#</cfoutput>">
<cfset ArticleSpecialities[1][2] = "<cfoutput>#mything2#</cfoutput>">
<cfset ArticleSpecialities[1][3] = "<cfoutput>#mything3#</cfoutput>">

If you build the array in this way, then you don't need the CFOUTPUTs cos
you're already in a cf tag (ie CFSET), so you can just do:

<cfset ArticleSpecialities[1][1] = mything1>
<cfset ArticleSpecialities[1][2] = mything2>
<cfset ArticleSpecialities[1][3] = mything3>

Bert

> -----Original Message-----
> From: K. Bennani [mailto:[EMAIL PROTECTED]]
> Sent: 27 March 2001 15:17
> To: Fusebox
> Subject: Strange CFLOOP behavior
> 
> 
> Hi,
> 
> This is not a fusebox specific question but I have a strange 
> behavior in a code for a Fusebox application.
> 
> I have a CFLOOP in a Form with the following code :
> 
> <CFLOOP INDEX="LoopCount" FROM="1" TO="#SpecialitiesCount#">
>     <input type="Checkbox" 
> name="checkbox<cfoutput>#ArticleSpecialities[LoopCount][1]#</c
> foutput>" value="Yes" <cfif 
> #ArticleSpecialities[LoopCount][3]# IS "1">checked</cfif>>
>     <cfoutput>#Trim(ArticleSpecialities[LoopCount][2])#</cfoutput><BR>
> </CFLOOP>
> 
> where ArticleSpecialities is a 2 dimensional Array.
> 
> When this page is displayed, everything seems fine unless I 
> display the source in my browser and the source show a 
> <CFOUTPUT> tag???
> 
> See below :
>      <input type="Checkbox" 
> name="checkbox<cfoutput>1</cfoutput>" value="Yes" >
>      <cfoutput>Pneumologie</cfoutput><BR>
>      
>      <input type="Checkbox" 
> name="checkbox<cfoutput>2</cfoutput>" value="Yes" >
>      <cfoutput>Cardiologie</cfoutput><BR>
>      
>      <input type="Checkbox" 
> name="checkbox<cfoutput>4</cfoutput>" value="Yes" >
>      <cfoutput>Cancerologie</cfoutput><BR>
>      
>      <input type="Checkbox" 
> name="checkbox<cfoutput>5</cfoutput>" value="Yes" >
>      <cfoutput>Dermatologie</cfoutput><BR>
> 
> Is this a bug or what am I doing wrong?
> 
> Thanks
> Kamal
> 
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to