How can I hold the selected value from a dropdown list?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tsubasa
    New Member
    • Aug 2008
    • 64

    How can I hold the selected value from a dropdown list?

    I have a dropdown list that is populated from a table in a database. Once the form is submitted error checking will take place. The data in the dropdownlist is clearing, while all the data in the textboxes is remaining. How can I hold the value of the dropdownlist selection?

    Thanks in advance, Tsu.


    Code:
    <tr>
                  <td width="10%">&nbsp;</td>
                  <td width="80%" colspan="5">
                  <select name="organization" size="1">
               <%
              'Open database get state taxes.
              set rs=openrs("SELECT * FROM aotable ORDER BY id")
              if not rs.eof then
                rs.movefirst
                while not rs.eof
                tempstate=rs("aounit")
                tempabbr=rs("ao")
               		%>
                  <option class="formfield"<%=tempsel%> value="<%=tempabbr%>"><%=tempstate%></option>
                    <%
                rs.movenext
                wend
              end if
              rs.close
              set rs=nothing
             %>    
                  </select>*</td>
                  <td width="10%">&nbsp;</td>
                </tr>
  • tsubasa
    New Member
    • Aug 2008
    • 64

    #2
    Can someone close this question, I found the answer on the Internet. Thank you!

    -Tsu

    Comment

    Working...