Multi-column combo box, change width on select

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Diane Yocom

    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


  • Curt_C [MVP]

    #2
    Re: Multi-column combo box, change width on select

    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" <diane.yocom.no spam@seattle.go v> wrote in message
    news:ejHmpwpaEH A.2908@TK2MSFTN GP10.phx.gbl...[color=blue]
    > 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[/color]
    description[color=blue]
    > 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[/color]
    to[color=blue]
    > 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[/color]
    change[color=blue]
    > the width on the onclick event, it hides the list and I have to click[/color]
    again.[color=blue]
    >
    > Is there anyway to just change the width of the list area?
    >
    > TIA,
    > Diane
    >
    >[/color]


    Comment

    • Bullschmidt

      #3
      Re: Multi-column combo box, change width on select

      I've done multiple-column listboxes like this:

      Classic ASP Design Tips - Fill a Listbox Possibly With Multiple Columns


      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
      Do you have an idea for a database on the Web? Hi! I'm a freelance Web and/or database developer who can make database information available 'live' on the Web.

      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!

      Comment

      • middletree

        #4
        Re: Multi-column combo box, change width on select

        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" <diane.yocom.no spam@seattle.go v> wrote in message
        news:ejHmpwpaEH A.2908@TK2MSFTN GP10.phx.gbl...[color=blue]
        > 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[/color]
        description[color=blue]
        > 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[/color]
        to[color=blue]
        > 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[/color]
        change[color=blue]
        > the width on the onclick event, it hides the list and I have to click[/color]
        again.[color=blue]
        >
        > Is there anyway to just change the width of the list area?
        >
        > TIA,
        > Diane
        >
        >[/color]


        Comment

        Working...