table name:stock
id_no(primary key...autono)
part_name(text)
price(currency)
now i have an asp and htmlbased form in which i have made a selection menu and an input field right under it
what i want is that my drop dow selection menu should have the total no of parts that are placed in the database and as soon as the user selects any of the parts,in the very next input field the same price saved in the db for that part should appear what i have done till now is as following i have made the selecion menu containing the db values of the field part_name and its working perfectly fine now what i want is that if i select name of any part no its corresponding price should appear in the text input box named "price" what should i be doing can any body help
Expand|Select|Wrap|Line Numbers
- <%
- set r=Server.CreateObject("ADODB.Recordset")
- connstr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db/db1.mdb")
- strSQL="Select * from sotck;"
- r.open strSQL, connstr, 3
- %>
- <td class="add"><div align="left">Customer Name:</div></td>
- <td width="150" align="Center" valign="Center"><div align="left">
- <SELECT name="cust_name" style="width:194px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 ">
- <option value="none" selected="selected">Please select a Customer</option>
- <%while not r.EOF%>
- <option value="<%=r.Fields("part_name")%>"><%Response.Write(r.Fields("part_name"))%></option>
- <%r.Movenext
- wend%>
- </SELECT>
- </div></td>
- <td class="add" ><div align="left">Price:</div></td>
- <td width="150" align="Center" valign="Center"><div align="left"><input name="price" type="text" size="25" style="width:194px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>