I've
built several applications that incorporated functionality like this. How you do
it depends in part on how many clients is "too many" for a drop down list.
If
it's a few hundred, you could populate a _javascript_ array with all of them.
Provide the user with a text input box and a select size=10 dropdown. A onKeyUp
event handler on the text box is used to loop through the array and count the
number of clients that begin with the string in the text box. If it's less than
some value you choose, you display them in the dropdown. The user clicks on one
in the dropdown to select it. Or if only one matches it's automatically
selected.
If
you're dealing with thousands of records, you could give the user a text input
box and a "lookup" link. When the user clicks "lookup" you take the value in the
text box and target another frame, and iFrame or a new window with a search
for matching records. If only one matches, you select it. If more than one
match, you give the user a choice to select one. When one is selected you put
it's value in the text box and optionally put its ID in a hidden field on the
original form and close the window if you opened one.
Dave
Shelley
-----Original Message-----In our application, we need to be able to positively identify clients and, will not be able to use a pop-down list as there will be too many choices to make this practical. What we are interested in is being able to type a portion of the client's name and have the system display the records in the database that most closely match the entry. Perhaps just starting with the first typed letter or first few letters in a list or a list which includes closest matches...
From: Jon van der Raadt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 12:54 PM
To: witango.com witango talk
Subject: Witango-Talk: Smart Look up
Has any one worked on or created functionality like this?
Any comments/suggestions would be appreciated.
---
-Dhanashri
TeamOnly
Web Solutions
/bigger>/bigger>/bigger>/bigger>/color>
412, Alastair Ross Technology Centre
3553 - 31 Street NW
Calgary, Alberta Canada T2L 2K7
http://www.teamonly.net/color>
Office: (403) 286-5586
Fax: (403) 286-5576
________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body