Garth,

This is exactly the functionality that we need. If you have an example it would be great otherwise some pointers to where to search would be terrific...

Thanks in advance

On Wednesday, February 19, 2003, at 07:33 PM, Garth Penglase wrote:

Yes, I have seen examples of this using javascript for reasonably long lists of, for instance, customer names. The entire array is returned and listed in the pop-down selection list (not a menu list) and as you type in the field it parses the array for those 'beginning with' the characters until only a few or one is still selected in the pop-down. It works very well.

I could search my javascript archives or you could check online for an example of this real-time selection method. I find this the better method since it means only one simple 'select all' on the column in a table, and if it is an oft-used list which isn't updated often, can be assigned to a domain variable to reduce the number of accesses on a database.

cheers
Garth

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-----
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

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...

Has any one worked on or created functionality like this?

Any comments/suggestions would be appreciated.


---
-Dhanashri


TeamOnly
Web Solutions

412, Alastair Ross Technology Centre
3553 - 31 Street NW
Calgary, Alberta Canada T2L 2K7

http://www.teamonly.net


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



--


---
Jon van der Raadt

TeamOnly
Web Solutions

412, Alastair Ross Technology Centre
3553 - 31 Street NW
Calgary, Alberta Canada T2L 2K7

http://www.teamonly.net


Office: (403) 286-5586
Fax: (403) 286-5576

Cell: (403) 863-6304
[EMAIL PROTECTED]

Reply via email to