ASP modify pull down menu problem

H

Henry Wiz

Hi all,

I got a ASP page, each row contain a "modify" button, when click the button
it will redirect to modify.asp, this page have 5 fields, 2 of then are pull
down menu.

My problem is, the pull down item always return to the default item but not
the item I choose before, so how to make the pull down item = chose item.

I think there are some errors in my scripts:

<select name="myfactory" class="listbox" value=<%=rs("factory")%>>
<option>factory01</option>
<option>factory02</option>
<option>factory03</option>
</select>

Any helps will be appreciated.
Thanks.
 
M

Maarten

When you create the dropdown, and the item match tehn insert SELECTED
<select name="myfactory" class="listbox" value=<%=rs("factory")%>>
<option>factory01 SELECTED</option>
<option>factory02</option>
<option>factory03</option>
</select>


Response.Write "<td class=""st"">" & vStatus & "</td><td><select
class=""box"" name=""qStatus"">" & vbCrLf
RS.open "SELECT * FROM tblStatus"
Do While Not RS.Eof
Response.Write " <option value=" & Chr(34) & RS("statId") & Chr(34)
Select Case language
Case Else
If RS("statId") = varStatus then Response.Write " selected "
Response.Write ">" & RS("statLang4") & "</option>" & vbCrLf
End Select
RS.MoveNext
Loop
RS.Close
Response.Write "</select></td>" & vbCrLf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top