"Fossies" - the Fresh Open Source Software archive

Member "tutor/forms/lesson08.html" of archive webtut41.zip:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted source code. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.

The next type of input is a Pull Down List. With this type you use <SELECT> instead of <INPUT> and it has a closing tag. Let's make one.

<FORM>
<SELECT>
</SELECT>
</FORM>


Don't forget to give it a name.

<FORM>
<SELECT NAME="BEST FRIEND">
</SELECT>
</FORM>


Next add a few options.

<FORM>
<SELECT NAME="BEST FRIEND">
<OPTION>Ed
<OPTION>Rick
<OPTION>Tom
<OPTION>Guido
</SELECT>
</FORM>


And give each <OPTION> a VALUE.

<FORM>
<SELECT NAME="BEST FRIEND">
<OPTION VALUE="ED">Ed
<OPTION VALUE="RICK">Rick
<OPTION VALUE="TOM">Tom
<OPTION VALUE="GUIDO">Guido
</SELECT>
</FORM>

The default option is the one that is listed first.


We can specify a default other than the first option in the list.

<FORM>
<SELECT NAME="BEST FRIEND">
<OPTION VALUE="ED">Ed
<OPTION VALUE="RICK">Rick
<OPTION VALUE="TOM" SELECTED>Tom
<OPTION VALUE="GUIDO">Guido
</SELECT>
</FORM>

<< BACK         NEXT >>