Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Web Development
Expertise: Beginner
Apr 14, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Creating a pull-down menu

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

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

<FORM> Pull-down Menu: <SELECT NAME=name SIZE=1> <OPTION>No items <OPTION>Item 1 <OPTION>Item 2 <OPTION>Item 3 <OPTION>Item 4 </select> </form>
Pull-down Menu:

Where NAME will be the name of the value, SIZE will show how many items show vertically, and OPTION will be submitted as a value to your script. The default 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 to select 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's obvious that one may choose more than one item. The problem with the multiple selection is that for each platform where the form is being viewed, you need to use a different key combination to select multiple items. So for multiple selections, if room permits, I recommend using a check-box.
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date