Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieve multiple records.

Status
Not open for further replies.

GoldPearl

Programmer
Joined
Aug 9, 2005
Messages
64
Hello

Can anybody tell me how to retrieve multiple records from a table based on the same criteria and display it as selected in a listbox?

For eg from a combo, i select a type of beverage(lstbev) and when i click the view button, i have all the characteristics for that beverage listed in a multiple selection listbox (lstchar).

Any code snippets would be welcome.

Regards,
Gold Pearl
 
post it in javascript forum...

on select item in combo box, you need to call a function that would populate all the items in the list box depending on the item selected in the combo...

-DNG
 
DNG..not exactly what i require.

output must b listed in a listbox where there are other characteristics and the ones that have been retrived from the db (ie the one that concern the chosen beverage) must be selected.
 
did you take a look at the link i provided...for example...once you select a Manufracturer(lets say Audi) you will get all the Models related to Audi populated in the listbox and everything here is from db...

is that not what you want?

-DNG
 
well lets say the user select a fruit juice ABC and select view. the same page contains a list box with these char:
oiliness, smoothness, pulpiness, flavor release, flavor masking, etc
and for that particulat juice only pulpiness, flavor release are selected.

ok now?
 
oh ok...so you want everything to appear in the list box but just highlight the items depending upon the selection in the first combo box...did i get you right??

but if that is the case wouldnt that be annoying for your users...
lets say you have 20 items in the list box ordered alphabetically...and i select ABC juice from the combo...if the characteristics are "blah" and "zzz"

then i have to scroll the list box until the end to see all the highlighted items related to my selection...

dont u think the example in that link is far better than your approach...

correct me if i did not get your approach...

-DNG
 
yes but i want the to be able to modify the char also in the same form. so i want the user to be able to deselect some and select others and save the new char.
 
you are looking for Ajax functions...

i did not understand what you meant by "i want the to be able to modify the char also in the same form"

please explain...

-DNG
 
well when the user makes a selection - choose position (on change event of listbox), the relevant details(duties) are highlighted in a second listbox which contains all possible details(this is the viewing part)

now for the criteria selected, the user can modify the details (select new details, unselect old) and be able to save changes.
(this is the modify part)

code for position listbox:

<p><font color="#FFFFFF" size="2" face="Arial"><strong>Position:
</strong></font></p>
<p><font size="2" face="Arial">
<select name="lstpos" size="10" multiple id="lstpos" >
<%
do while not rspos.eof %>
<option ><%=rspos(0)%></option>
<%
rspos.movenext
loop
rspos.close
set rspos = nothing
%>
</select>



code for duty listbox:
<select name="lstduty" size="15" id="lstduty" multiple>

<% do While not rsduty.EOF %>
<option><%=rsduty(0)%> </option>
<%
rsduty.MoveNext
loop

rsduty.close
set rsduty = nothing
%>
</select>

tks
 
more related to Javascript. Please post it in javascript forum.

-DNG
 
When i post in javascript, they say it conerns more ASP and here u people say the contrary! :( wat 2 do???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top