Forms, Element - List Box

Use

The select element is used for menus. There are two different menus; scrollable menus and drop down lists (See below). Each item in a menu is called an option and each option has its own properties.

Properties

ATTRIBUTE

REQUIRED?

DESCRIPTION

MULTIPLE=" "

Optional

Defines a scrollable list.

SIZE=" "

Optional

If you are using a scrollable list, the size property defines how many options are displayed.

Option Properties

ATTRIBUTE

REQUIRED?

DESCRIPTION

SELECTED

Optional

Displays the default option.

VALUE=" "

Optional

Instead of returning the text after the Option tag, the VALUE text is returned.

Example - Scrollable Menu

Have you read any of the following books?<BR>

<SELECT NAME="Book_Read" MULTIPLE SIZE="5">

<OPTION> Compendium Maleficarum

<OPTION> Middle English Literature and Its Background

<OPTION> Journal of Tomas Norton

<OPTION> The Magus

<OPTION> The Book of the Sacred Magic of Abramelin the Mage

<OPTION> The Discoverie of Witchcraft

<OPTION> The Rosicrucian Enlightenment

<OPTION> Malleus Maleficarum

</SELECT>

Example - Drop Down List

Which book was your favorite?<BR>

<SELECT NAME="Favorite_Book">

<OPTION> Compendium Maleficarum

<OPTION> Middle English Literature and Its Background

<OPTION SELECTED> Journal of Tomas Norton

<OPTION> The Magus

<OPTION VALUE="Abramelin"> The Book of the Sacred Magic of Abramelin the Mage

<OPTION> The Discoverie of Witchcraft

<OPTION> The Rosicrucian Enlightenment

<OPTION> Malleus Maleficarum

</SELECT>

Which book was your favorite?

 

NOTE

For this example to work it must be inside form tags (<FORM &ldots;> &ldots; </FORM>). The entire form code, including all the examples, is ready for you to use.


  Form Elements