Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Two Columns in Dropdown Box

    Hi. Is it possible to have two columns inside a dropdown or select box?
    The thing is that I have records from two separate fields in a database and I want to display it in the select box so that it looks neat.

    anyone?

  • #2
    New Coder TripperTreats's Avatar
    Join Date
    Oct 2006
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've done a little research and I really don't think this is possible. Your options are to use the <optgroup> tag to physicall separate (although vertically) the different sets. You can manufacture two columns in one select box with periods or spaces in between. Finally, you could use some tedious javascript to make your own 2 column select box. You could either have an invisible <div> tag with 2 layers in it pop up when the user clicks, or you could have one select box and an invisible one right next to it, and whenever a user clicks the one select box, the other becomes visible and simultaneously open. At least, I think you can make a select box open with javascript, although I'm not sure how.
    Psychedelic digital art at www.trippertreats.com.

    "And in the end, the love you take
    is equal to the love you make
    ."


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •