-
I have a select box in a form. Everything worked fine until yesterday when I had to change the code around for reasons beyond my control. Now, the receiving form does not recognize that the select box has a value.
I am almost positive that the error is in the following code, and I think it may have something to do with the quotes around the control name "cmbFacility" But of course I am not sure and am not getting anywhere. Help?? Thanks!
Code:
rsFacility.MoveFirst
response.write "<tr><td>"
response.write "<b>Select Facility: </b></td><td><SELECT NAME="
response.write "cmbFacility"
response.write "SIZE=1 DEFAULT=True>"
Do While Not rsFacility.EOF 'define the ListBox options
response.write "<OPTION VALUE=" & rsFacility("FAC_NAME") & ">" & rsFacility("FAC_NAME")
rsFacility.MoveNext
Loop
response.write "</SELECT></td></tr>"
-
Answered my own question. For the curious, I needed to use chr(13):
Code:
rsFacility.MoveFirst
response.write "<tr><td>"
response.write "<b>Select Facility: </b></td><td><SELECT NAME="
response.write chr(13) & "cmbFacility" & chr(13)
response.write "SIZE=1 DEFAULT=True>"
Do While Not rsFacility.EOF 'define the ListBox options
response.write "<OPTION VALUE=" & rsFacility("FAC_NAME") & ">" & rsFacility("FAC_NAME")
rsFacility.MoveNext
Loop
response.write "</SELECT></td></tr>"
-
In actuality the problem was that you had no space between cmbFacility and SIZE=1...
so the name of the select box was cmFacilitySIZE=1
quotes areound things in html is not necessary (YET!)