Forum Moderators: open

Message Too Old, No Replies

How do i display my Selected list box results?

help needed

         

Andrew Thomas

10:56 am on Dec 13, 2002 (gmt 0)

10+ Year Member



Ok - Still learning, but im stuck again.

Ive created a list box which displays the description and price from a database.

Ive declared a variable to show the list box results, but it only shows the first one, i need it to show the one ive selected. Apparently I need to use an array, but to be honest im totally stuck. Ive jumped in the deep end, but need to get this working.

here is the code snippets so far....

While (NOT rs_processor.EOF)
currentprocessor = rs_processor.Fields.Item("component_description").Value
currentprocessorprice = rs_processor.Fields.Item("component_price").Value
%>
<option value="<%=(rs_processor.Fields.Item("component_description").Value)%>&nbsp;£<%=(rs_processor.Fields.Item("component_price").Value)%>"><%=(rs_processor.Fields.Item("component_description").Value)%>&nbsp;£<%=(rs_processor.Fields.Item("component_price").Value)%></option>
<%
rs_processor.MoveNext()
Wend
If (rs_processor.CursorType > 0) Then
rs_processor.MoveFirst
Else
rs_processor.Requery
End If
%>
</select>

<input name="currentprocessor" type="text" VALUE="<%=currentprocessor & currentprocessorprice%>">

I need this to automatically update to my chosen description within the list box

Any help is appreciated

thanks

SuzyUK

11:15 am on Dec 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Andrew..I'm quite new to this asp stuff as well..but I'll try

when you say you need it to update to your choice, are you getting to this point after already selecting your item on another page, or should this be a drop down list from which you want to select your choice..

if you have a sample online sticky the link

Suzy