469,352 Members | 1,795 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

Multi-column combo box, change width on select

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
Jul 19 '05 #1
3 4993
not with ASP. You might be able to do something with javascript layers but
I'd hit that up in a js group perhaps.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Diane Yocom" <di****************@seattle.gov> wrote in message
news:ej**************@TK2MSFTNGP10.phx.gbl...
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

Jul 19 '05 #2
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...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3
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.
"Diane Yocom" <di****************@seattle.gov> wrote in message
news:ej**************@TK2MSFTNGP10.phx.gbl...
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

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

37 posts views Thread by ajikoe | last post: by
4 posts views Thread by Frank Jona | last post: by
5 posts views Thread by bobwansink | last post: by
17 posts views Thread by =?Utf-8?B?R2Vvcmdl?= | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.