|
-
Jun 13th, 2002, 03:09 PM
#1
Thread Starter
Junior Member
HELP!! dynamically populate listbox/drop-down
Here's one for ya:
I have a textbox and a drop-down menu used for a browser-based 'search' application.
I want the user to be able to type in text in the textbox, and have the drop-down menu repopulated on each keypress (by data pulled from a database)
example: there are 10 B words in the database. if the user types B, all the words will pop up in the drop-down. If the user types Br, only the words starting with (or containing) BR will be in the drop-down... get it?
i'm using coldfusion to do the database query (select * from TABLE where WORD LIKE [form.textbox]
ANY IDEAS???
-
Jun 14th, 2002, 06:47 AM
#2
Frenzied Member
Sounds painfully slow to me!
Each time the user types a letter in the dropdown box the page will have to be refreshed from the server. Yuk!
-
Jun 14th, 2002, 02:29 PM
#3
New Member
Its an intranet site. bandwidth isn't an issue. any ideas?
-
Jun 14th, 2002, 02:34 PM
#4
New Member
i wouldnt want the page refreshed, just the items in the listbox... the more i explain it, the more silly and impossible it seems...
as an alternative, i just had the sql query populate the dropdown with all possible values from the database:
(if you're familiar with coldfusion):
[CODE]<cfquery name="GetItemsForDropDown" datasource="projdec">
select * from MyDatabase
</cfquery>
<select name="MyDropDown">
<cfoutput query="GetItemsForDropDown">
<option value="#OneItem#">#OneItem#</option>
</cfoutput>
</select>
it works, its just not as nice as i'd like it to be
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|