Hi,
I want to be able to select an item from a list and then
have the cost of the item to be displayed in a response.write - so far i have a combo
-the value i choose from the list is warranty
-the value i want displayed is warrcost
I want to be able to select an item from a list and then
have the cost of the item to be displayed in a response.write - so far i have a combo
-the value i choose from the list is warranty
-the value i want displayed is warrcost
Code:
<%
x_warridList = "<select name='x_warrid'><option value=''>Please Select</OPTION>"
sqlwrk = "SELECT `warrid`, `warranty`, `warrcost` FROM `tbl_warranty`" & " ORDER BY `warranty`"
Set rswrk = Server.CreateObject("ADODB.Recordset")
rswrk.Open sqlwrk, conn, 1, 2
If Not rswrk.Eof Then
datawrk = rswrk.GetRows
rowswrk = UBound(datawrk, 2)
For rowcntwrk = 0 To rowswrk
x_warridList = x_warridList & "<option value='" & datawrk(0, rowcntwrk) & "'"
If CStr(datawrk(0, rowcntwrk)&"") = CStr(x_rflid&"") Then
x_warridList = x_warridList & " selected"
End If
x_warridList = x_warridList & ">" & datawrk(1, rowcntwrk) & "</option>"
Next
End If
rswrk.Close
Set rswrk = Nothing
x_warridList = x_warridList & "</select>"
Response.Write x_warridList
%>