Passing Value After Looping

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jsungmin
    New Member
    • Jan 2013
    • 13

    Passing Value After Looping

    Hye all..
    In my html, it display the value of average for each question in table. So the problem is the value of average for each question is in the looping function. So how can I pass the value of average for each question into bar chart which is out of the looping?
    Code:
    <form name="survey_form" method="post" action="#currentfile#">
    <table>
    <cfloop query="GetDetailQuest">
    <tr>
      <td class="cssNormal" align="center">#numberFormat(totAVG,"0.00" )#</td>
    </tr>
    </cfloop>
    </table>
    This is chart code
    Code:
    <cfchart
      	 format="png"
       	 scalefrom="0"
         scaleto="10"
         show3D="Yes"
         chartWidth="350"
         chartHeight="390">
         <cfchartseries
         	 type="bar"
             seriescolor="blue">
             
             <cfloop query="GetDetailQuest">
        		 <cfchartdata item="#quest_eng#" value="#numberFormat(totAVG,"0.00" )#">
             </cfloop>
       
      	 </cfchartseries>
    	</cfchart>
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Does your code not work with another loop as you've posted?

    Comment

    • jsungmin
      New Member
      • Jan 2013
      • 13

      #3
      what I want to do is, I just want to get the value of average for each question from looping. My chart does not use looping, i means code for chart outside from looping. So now, how can I pass the value of average that inside of looping to the value of chart that outside of the looping?
      any idea? :)

      Comment

      Working...