Multi-column combo box, change width on select

D

Diane Yocom

Has anybody ever seen or written code for ASP that would mimic Access'
multi-column combo box? Specifically, I have a drop down box that lists
about 100 five-digit codes. Each of these codes has a long text description
that explains what the code represents.

I'd like to be able to show the code plus description when the drop down
list is dropped down, but just the code when the list is not displayed, so
that I don't have to have a hugely long combo box taking up space.

So, for instance, if I had a drop down list of airports and I'd selected
SeaTac, I'd just see SeaTac in the drop down box text area, but if I were to
click on the arrow and drop down the list, I'd see:
SeaTac Seattle-Tacoma International Airport
MCI Kansas City, MO International Airport
etc...

I know you can change the width of the combo box through javascript, but
that screws up the rest of the fields to the right. Plus, whenever I change
the width on the onclick event, it hides the list and I have to click again.

Is there anyway to just change the width of the list area?

TIA,
Diane
 
B

Bullschmidt

I've done multiple-column listboxes like this:

Classic ASP Design Tips - Fill a Listbox Possibly With Multiple Columns
http://www.bullschmidt.com/devtip-filllistbox.asp

But I've never done any that change their own width and I agree that
they can get pretty wide depending on how much you're trying to show.

Best regards,
J. Paul Schmidt, Classic ASP Web Designer
http://www.Bullschmidt.com
Classic ASP Design Tips, ASP Web Database Demo, ASP Bar Chart Tool...
 
M

middletree

For the record, there is no such thing as a combo box in HTML. It's called a
listbox, a select box, or mabe even a dropdown. But "Combo" is a Windows
object that looks like a listbox, but allows users to type in a new value if
the ones in the list don't make them happy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top