HTML Drop Down List with Multiple Selections

I am trying to create a drop down list that will allow to select more than one option.

Using the code below creates a list but that can only be scrolled down with the arrow keys and it not obvious if you don't know. Also I need the selected values to be return as follows

<select size="1" name="Test" multiple>


and not


Is there any easy way of accomplishing this without using complex code from ASP or Java?
Who is Participating?
Chris StanyonCommented:
You can only have the dropdown if you don't set it to multiple. If you set it to multiple, then the dropdown disappear and you box will be a set number of rows deep. The reason you can only use the arrows is because you have the size set to 1.

Also, to return all the selected values you need to name your <select> as an array. You can then loop through the selected items in your handler script.

<select size="3" name="Test[]" multiple>

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.