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 8 of 8
  1. #1
    Senior Coder angst's Avatar
    Join Date
    Apr 2004
    Location
    Toronto, Ontario
    Posts
    2,114
    Thanks
    15
    Thanked 122 Times in 122 Posts

    javascript drop down menu question

    Hello,
    is it possible to have a drop down menu <select> that has columns using javascript? i've seen alot of kool stuff done is in js and so i thought maybe this could be done too,,
    if it can be done, could some one please show me an example?

    thanks in advance for your time!
    ken

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What do you mean by columns? So that each option has columns? Perhaps tabs might help you..

    Sadiq.

  • #3
    Senior Coder angst's Avatar
    Join Date
    Apr 2004
    Location
    Toronto, Ontario
    Posts
    2,114
    Thanks
    15
    Thanked 122 Times in 122 Posts
    well,
    i meant like a select menu

    <select>
    <option></option>
    </select>

    but with a second column, insted of just one?
    is it possible?

  • #4
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know what a select is, but I don't know what you mean by column.

    Sadiq.

  • #5
    Senior Coder angst's Avatar
    Join Date
    Apr 2004
    Location
    Toronto, Ontario
    Posts
    2,114
    Thanks
    15
    Thanked 122 Times in 122 Posts
    u don't know what a column is?

    like rows and columnes?

    well,
    a row goes across, and columns run down,

    so in the drop down there would be two lists going down insted of just one.

  • #6
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know what a column is, I'm just not sure what you want in terms of columns.

    How is what you want different from having two or more drop-down selects? Like are things in the second column different from things in the first column on the same row?

    Do you want a dropdown select that drops down into a calender for the month of January and you pick a day and the calender looks like a table with 7 columns (monday-sunday) and 4 or 5 rows? Not specifically this, but that's the idea behind multiple columns and rows.

    Or do you want columns instead of rows? So when you click the drop down arrow, instead of a vertical list of rows, you get a horizontal list of columns?

    Or do you want a vertical list of rows where each row has columns to separate the information on that row? But each row/column combination does not indicate a separate cell for selection, the entire row is a unique selection. Like this:
    Code:
    <select>
     <option>January  | 1  | 2004</option>
     <option>January  | 25 | 2004</option>
     <option>February | 12 | 2004</option>
    </select>
    Now do you see why I'm so confused with your question?!?! lol, it's very ambiguous if you're not specific!

    Sadiq.
    Last edited by sad69; 07-14-2004 at 10:59 PM.

  • #7
    Senior Coder angst's Avatar
    Join Date
    Apr 2004
    Location
    Toronto, Ontario
    Posts
    2,114
    Thanks
    15
    Thanked 122 Times in 122 Posts
    yes i want something like this,
    so that all the info stays lined up

    Code:
    <select>
    <option>username | age | country</option>
    <option>Bob         | 25  | US</option>
    <option>John        | 19  | CA</option>
    </select>
    right now,, i'm displaying all the data in a table,, but that takes up alot of space,, but just a normal <select> box doesn't enough info well selecting,
    i could make it show more info, but things get kinda mashed together with out some sort of columns controling how the data is placed..


    am i making any sence now?

    thanks again for your time!
    ken

  • #8
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yep, and here's what I've found online:
    http://www.cs.tut.fi/~jkorpela/forms/choices.html (look for Example: "tabulated options")

    It's not really possible, unless the font is set to like courier or some fixed-width font. There's no real notion of tabs or columns, just the spaces between the words. If you're creating this select list dynamically, it probably won't work (well I shouldn't say that, I'm sure you can hack it to make it work..), but if you're creating this one by hand, then you can do it, it'll just be slightly tedious to create.

    And if you make any additions where one column's value is longer than the current column width, you're going to have to add spaces on all the other rows... so be aware.

    Not sure if that helps you at all, but it's basically not possible.

    Good luck,
    Sadiq.


  •  

    Posting Permissions

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