Hi,
I have a update form that populates fields from a database. I can populate the text fields from the database without any problem. However, I would like to set the selection value to the value of the record in the database. Is this possible ?
I have attached the code below should it help understand what I'm trying to achieve.
<table class="table" width="600">
<form name="form1" ID="form1" method="post" action="taskupd.asp">
<input type="hidden" name="ID" value=<%=rsAction("ID")%> >
<input type="hidden" name="customer" value=<%=rsAction("actdate")%> >
<th><tr width="100" valign="top"><td>Action:</td></th>
<td><textarea rows="5" cols="20" name="action"><%=rsAction("action")%></textarea></td></tr>
<tr><td valign="top">Notes:</td>
<td><textarea rows="5" cols="20" name="notes"><%=rsAction("notes")%></textarea></td></tr>
<tr><td>Status :</td><td><select name="status">
<option value="1" >Stopped</option>
<option value="2">In Progress</option>
<option value="3">Completed</option>
</select>
</td></tr>
<tr><td></td><td>
<input type="button" value="Cancel" onclick=location.href="tasksef.asp"><space>
<input type="submit" name="Submit" value="Update Record"</td></tr>
</table>
Thanks in Advance...
" New To Programming - Learning Fast
I have a update form that populates fields from a database. I can populate the text fields from the database without any problem. However, I would like to set the selection value to the value of the record in the database. Is this possible ?
I have attached the code below should it help understand what I'm trying to achieve.
<table class="table" width="600">
<form name="form1" ID="form1" method="post" action="taskupd.asp">
<input type="hidden" name="ID" value=<%=rsAction("ID")%> >
<input type="hidden" name="customer" value=<%=rsAction("actdate")%> >
<th><tr width="100" valign="top"><td>Action:</td></th>
<td><textarea rows="5" cols="20" name="action"><%=rsAction("action")%></textarea></td></tr>
<tr><td valign="top">Notes:</td>
<td><textarea rows="5" cols="20" name="notes"><%=rsAction("notes")%></textarea></td></tr>
<tr><td>Status :</td><td><select name="status">
<option value="1" >Stopped</option>
<option value="2">In Progress</option>
<option value="3">Completed</option>
</select>
</td></tr>
<tr><td></td><td>
<input type="button" value="Cancel" onclick=location.href="tasksef.asp"><space>
<input type="submit" name="Submit" value="Update Record"</td></tr>
</table>
Thanks in Advance...
" New To Programming - Learning Fast