macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Re: Expert's help need...Please help

Subject: Re: Expert's help need...Please help
From: "Steve Sommers"
Date: Sat, 18 Aug 2007 00:05:11 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
I don't see anything obvious. My guess is that your course_selected if 
statement is failing. I modify your code as follows and look carefully at the 
two query result sets and make sure both contain what you are expecting:


 <cfif student_details_q.recordcount gt 0>
 <cfdump var="#student_details_q#">
 <cfdump var="#course_q#">
        <cfset editcount = 1>
                <input type="hidden" name="student_details_q_recordcount" 
value="<cfoutput>#student_details_q.recordcount#</cfoutput>">
                <cfloop query="student_details_q" startrow="1" 
endrow="#student_details_q.recordcount#">
                        <tr>
                                <td>
                                        <select name="Course_#editcount#" 
onChange="document.forms['Course_frm'].Course_credit_#editcount#.value=this.valu
e.substring(0,this.value.indexOf(','));"> 
                                                <option value=""></option>
                                                        <cfoutput 
query="course_q">
                                                                <option 
value="#credit#,#course#" <cfif 
#student_details_q.course_selected# eq 
#course#>selected</cfif>>#course#</option> 
                                                        </cfoutput> 
                                        </select>
                                </td> 
                                <cfoutput>
                                <td> 
                                        <input type="text" 
name="Course_credit_#editcount#" 
value="#student_details_q.Course_credit#" size="2" maxlength="2">
                                </td> 
                                <td>
                                        <input type="text" 
name="Course_Fee_#editcount#" 
value="#student_details_q.Course_Fee#" size="9" maxlength="9">
                                </td> 
                                </cfoutput>
                        </tr>
                        <cfset editcount = editcount + 1>
                </cfloop>
 </cfif>


<Prev in Thread] Current Thread [Next in Thread>