...

View Full Version : javascript drop down menu question



angst
07-14-2004, 06:00 PM
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

sad69
07-14-2004, 06:59 PM
What do you mean by columns? So that each option has columns? Perhaps tabs might help you..

Sadiq.

angst
07-14-2004, 08:38 PM
well,
i meant like a select menu

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

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

sad69
07-14-2004, 09:01 PM
I know what a select is, but I don't know what you mean by column.

Sadiq.

angst
07-14-2004, 09:27 PM
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.

sad69
07-14-2004, 09:57 PM
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:


<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.

angst
07-14-2004, 10:06 PM
yes i want something like this,
so that all the info stays lined up



<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

sad69
07-14-2004, 10:22 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum