By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,193 Members | 1,559 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,193 IT Pros & Developers. It's quick & easy.

Multi-column combo box, change width on select

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.