Drop down box

samsmithnz

Senior Contributor
Joined
Jul 22, 2003
Messages
1,038
Location
Boston
I'm trying to implement a drop down box in ASP.NET where I can type and it will return the names of users from a database. So if I type 'S', it narrows down the dropdown list to users whose name starts with 'S' and so on.

Couple of things though, I can't find a dropbox where I can type. I know they exist, I've used them in .NET applications....

Maybe it was plain HTML...

I'm not worried about speed issues or having to repeatenly query the database, this is a proof of concept, any method is a good method at the moment.
 
Well, how about not using a dropdownlist, but rather a textbox, fill a javascript array on the client side, then use layer/scroll div to pop up and use reg ex to match the text after the KeyUp event, find it in the array and focus position in the layer. Thats just a thought.
 
kahlua001 said:
Well, how about not using a dropdownlist, but rather a textbox, fill a javascript array on the client side, then use layer/scroll div to pop up and use reg ex to match the text after the KeyUp event, find it in the array and focus position in the layer. Thats just a thought.

haha. is that something you've done before? I don't want to spend 4 hours implementing this to find out its impossible.
 
Nope, never done this exactly, like I said, its just a thought. I HAVE done everything that I listed in seperate code, so I would image it is possible, that is, if it meets your business requirements.
 
kahlua001 said:
Nope, never done this exactly, like I said, its just a thought. I HAVE done everything that I listed in seperate code, so I would image it is possible, that is, if it meets your business requirements.

Kahlua, could you possilbly send me a sample of the javascript dropdown scrolling part? Javascript is definetly not my strong point...
 
Back
Top