shadowline
Check Boxes << DropList & ListBox >> Form Extras
Drop lists and List boxes are a way to offer a list of options to choose from without taking up a lot of space.

DROP LISTS are the smallest way to display a list. The width of a drop list is determined by the width of the longest OPTION in the list provided. (It hates to waste space). Only one list item will be shown in view since a drop list is only one line high.

Lists use a SELECT ~ OPTION method to get information. The SELECT command sets the FORM for a field of information or list. The OPTION commands create the list within the field.

Please choose an option :
Please choose an option :
<select name="decision">
<option selected>Plan 1
<option>Plan 2
<option>Plan 3
<option>Plan 4
<option>Plan 5
</select>

selectcreates a text area for options with a drop button.
name="decision"gives a description of the list. This name will be sent in the feedback along with the selected OPTION.
option creates the list. There is no ending tag for OPTION.
selectedcreates a default choice. This option will be placed in view when the visitor views the FORM. If SELECTED is not specified in any OPTION, the first OPTION will be the first in view. This property is optional.



LIST BOX is similar to a text box. It shows a declared number of text rows and gives the visitor a list of choices. Similar to the drop list, the list box length is determined by the length of the longest OPTION.

Please choose an option :
Please choose an option :
<select size="3" name="decision2">
<option selected>Plan 1
<option>Plan 2
<option>Plan 3
<option>Plan 4
<option>Plan 5
</select>

The only difference you will see from the code of a drop list is the first line. The size property is now added. The rest of the code is the same as the drop list.


SIZEcreates the number of text lines the box is going to show going down. If the list is longer than the declared size, scroll bars will appear to view the OPTIONS further down the list. In the above example, there are 5 options, but only 3 of them are in view at one time.

Please choose an option :
<select size="3" name="decision2" multiple>
<option selected>Plan 1
<option>Plan 2
<option>Plan 3
<option>Plan 4
<option>Plan 5
</select>

MULTIPLE is an optional property. Left out, the selection defaults to allow only one answer. Using MULTIPLE allows more than one option to be selected.
Check Boxes << DropList & ListBox >> Form Extras
shadow

Advertise in the banner along the top, Click here!

Valid XHTML 1.0 Transitional Valid CSS! Text Link Ads
shadow
shadow