Drop-down list does not appear selected value

Hello

I have a problem. The output of a query results page. There are 2 fields must be updated: scholarshipID and amount. I want to update my request at a time. My dynamic drop-down list does not appear selected value. The value is there, but it does not recognize in the drop-down list. I could not find the error. My code is below, so please help...

< name cfquery = "getStudentsData" datasource = "#application. DSN #">"
Select StudentID, fname, lname, GPA, Tbl_Students.ID, ScholarshipID, rise, Tbl_StudentsScholar.ID as the SSID, AwardStatus
of Tbl_Students, Tbl_ApplyYear, Tbl_EduBckgrnd, Tbl_StudentsScholar
where Tbl_Students.ApplyYr = Tbl_ApplyYear.id
and Tbl_Students.id = Tbl_EduBckgrnd.SID
and Tbl_Students.ID = Tbl_StudentsScholar.SID
and ApplyYear = 1
and steps = 7
order by studentid
< / cfquery >

< name cfquery = "getScholarship" datasource = "#application. DSN #">"
Select AcctNum, scholarship, Tbl_Scholarships.id, Code
of Tbl_Scholarships, Tbl_DistCode
where Tbl_Scholarships.DistCode = Tbl_DistCode.id
AcctNum order
< / cfquery >

< cfparam name = 'X' default '0' = >
< cfparam name = default "CounterX" = "0" >

<!--get scholarship-->

< cfif getStudentsDataRet.RecordCount eq 0 >
< class p 'paragraph' = > No Records Found < /p >
< class p = "pageheight" > < / p >
< class p = "pageheight" > < / p >
< cfelse >


< class p = "submitmessage" > records found - < cfoutput > #getStudentsDataRet.Recordcount # < / cfoutput > < / p >
< table width = "98%" border = "1" cellpadding = "3" cellspacing = "0" style = "" border-collapse: collapse "bordercolor ="#000000"align ="center">"
< class tr = "steptext2" bgcolor = "#999999" align = "center" >
< td width = "10%" > Student ID < table >
< td width = "9%" > name < table >
< td width = "9%" > name < table >
< td width = "5%" > GPA Cum < table >
< td width = "5%" > account # < table >
< td width = "5%" > < table > amount
< td width = "20%" > account # | Dist Code | Scholarship name < table >
< /tr >

< do action = "updateAward.cfm" method = "post" name = "AwardForm" > "
< cfoutput query = "getStudentsDataRet" >
< cfif eq x 0 and x neq getStudentsDataRet.recordcount >
< cfset x = 1 >
< cfelseif x neq (getStudentsDataRet.recordcount + 1) >
< cfset x = x + 1 >
< / cfif >
< class = "paragraph" tr >
< td > #StudentID # < table >
< td > #lname # < table >
< td > #fname # < table >
< td > #GPA # < table >


< cfif AwardStatus eq 2 >
< name cfquery = "getStudentsScholar" datasource = "#application. DSN #">"
Select Code, Tbl_Scholarships.id, AcctNum, scholarships
of Tbl_Scholarships, Tbl_DistCode
where Tbl_Scholarships.DistCode = Tbl_DistCode.id
and Tbl_Scholarships.ID = #getStudentsDataRet.ScholarshipID #.
< / cfquery >
< / cfif >
< td >
< select name = "" scholarshipID_ #X # "onChange =" showMessage_ #X #(this.options[this.selectedIndex].value) ">"
< option value = "" > < / option >
< cfloop query = "getScholarshipRet" >
< option value = "" #id # "selected < cfif getStudentsDataRet.ScholarshipID eq id > < / cfif > > #AcctNum # < / option >"
< / cfloop >
< / select >
< table >
< td > < input name = "" amount_ #X # "type ="text"size ="5"< cfif amount gt 0 > value = ' #NumberFormat (amount, 99.99) # ' < / cfif > / > < table >"
< td > < cfif AwardStatus eq 2 > #getStudentsScholar.AcctNum # | #getStudentsScholar.Code # | #getStudentsScholar.Scholarship # | #getStudentsDataRet.ScholarshipID # < / cfif > < table >
"< input name =" "IndexID_ #x #" type = "hidden" value = "#SSID #" / >
< /tr >
< / cfoutput >
< cfoutput > < input name = "CounterX" type = "hidden" value = "" #getStudentsDataRet.RecordCount # "/ > < / cfoutput >"
< b >
< td align = "center" colspan = "11" height = "50" valign = "middle" > < input name = "Submit" type = "submit" value = "Submit" / > < table >
< /tr >
< / make >
< /table >
< / cfif >

the syntax is: getStudentsDataRet.ScholarshipID [1]

where '1' is the line number to specify

Tags: ColdFusion

Similar Questions

Maybe you are looking for

  • Re: Satellite A210-10Y - disk SMART failure

    Hello I am the proud owner of a Satellite A210-10Y. (160 GB HDD). This morning I get an error message during boot: SMART drive predicted failure. Back up all data and press F1. After some research here, I downloaded the tool form hdtune.com. This ret

  • Function through Express Port Replictor II keys

    Hello Someone at - he found a way to activate the function keys work on an external keyboard connected via the Port Express Replictor II? It would be very useful to be able to use, for example, F8 to turn on or off the wireless LAN, the laptop is doc

  • I want to look at _ vidios

    I want to look at _ vidios1

  • OfficeJet 4500 scan does not create a file on disk

    Recently purchased, this replaces a PhotoSmart HP 2570, no problem with the software install, printer setup, network (ethernet connected), etc. Print and copy of work. Did not try the fax. Scan to file (pic to file) does not create a file on the disk

  • Visual C++ 2010 Express Edition - project creation failed

    Hi, I use Visual C++ 2010 Express Edition and after it licenses through the Microsoft Web site, I can't make it work properly.Whenever I try to create a new project, I get this error message: "Failed to create project creation project 'project name'.