devxlogo

Creating a pull-down menu

Creating a pull-down menu

Question:
I am trying to create a pull-down menu for my Web page, and it is not working.

Answer:
The syntax for creating a pull-down menu is as follows:

Pull-down Menu:
Pull-down Menu:

Where NAME will be the name of the value, SIZE will show how many items showvertically, and OPTION will be submitted as a value to your script. Thedefault behavior of this form component is to allow for only one item(OPTION) to be chosen at a time. “Select Boxes” can also allow the user toselect multiple items by simply adding: MULTIPLE like…

<select multiple name="sample" size="2"> . . . </select>Note that you may want to enlarge the SIZE so that it’sobvious that one may choose more than one item. The problem with themultiple selection is that for each platform where the form is being viewed,you need to use a different key combination to select multiple items. Sofor multiple selections, if room permits, I recommend using a check-box.

devx-admin

Share the Post: