Click to See Complete Forum and Search --> : Woh


Jonathan
07-01-2003, 01:14 PM
How do you make a select box type thing???

//////////////
//option 1//
//option 2//
//option 3//
//option 4//
//option 5//
/////////////

Like that....

I know about the select tag, but that isn't it.

brendandonhue
07-01-2003, 01:35 PM
Yes it is.
<select name="select">
<option value="1">1
<option value="2">2
<option value="3">3
</select>

Jonathan
07-01-2003, 03:00 PM
Doesn't that make a dropdown box? I don't want a dropdownbox... I need a select box...

brendandonhue
07-01-2003, 03:03 PM
Try this
<select name="select" multiple>
<option value="1">1
<option value="2">2
<option value="3">3
</select>

Jonathan
07-01-2003, 03:10 PM
say yes, that is what it is... but can you prevent people from choosing multiple things?

brendandonhue
07-01-2003, 03:16 PM
No-thats why its called Select Multiple.
Well, you could stop them at the validation phase, but not prevent them from selecting multiple items.

Jonathan
07-01-2003, 03:19 PM
Well, thank you...

pyro
07-01-2003, 03:45 PM
Actually, yes you can. You use the size attribute, rather than the multiple attribute:

<select name="select" size="3">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>

Jonathan
07-01-2003, 03:46 PM
That makes since... Thanks pyro

pyro
07-01-2003, 04:36 PM
You're welcome... :)