PDA

View Full Version : list from database when typing value



abie
11-24-2005, 10:33 AM
In my list box the user has to choose a product (from a of about 1000 items)
To select the desired item the user will type the first letter(s) of the product to get values starting with the letter will display in list from the database
(like the browser property).....is somebody help me to solve the problem

jscheuer1
11-25-2005, 06:10 AM
Sounds like extra work too me. You could easily populate a select element with all 1000 items, as options, at once, in alphabetical order. Using a select box like this:


<select size="3" multiple onkeyup="this.scrollTop=this.scrollTop+35;">
<option>aa
<option>aa
<option>aa
<option>aa
<option>aa
<option>aa
<option>aa
<option>aa
<option>aa
<option>aa
<option>dd
<option>dd
<option>dd
<option>dd
<option>dd
<option>dd
<option>dd

snip . . .

<option>oo
<option>oo
<option>oo
<option>oo
<option>oo
<option>oo
<option>oo
</select>

The onkeyup event only works in FF but, it is just an embellishment. Once it has focus, the select element itself will scroll to the first entry starting with the letter of the key pressed.

abie
12-01-2005, 06:04 AM
thanks for the code but i am looking for a list which displays items starting with the typed letter(letters),and also the list items will be from database can u help me with these problems