Question : HTML Multiselect  Box

I have a multiple select box with more than 100 values in it. What I want to do is when a user selects any value from the box, I want to show the selection in the next column. So as the user keep on selecting the values, all the selected values will apear next to the multi select box. So that user is aware of what values he has selected. If experts can guide on how I can do it, It will be grt.

thanks

Answer : HTML Multiselect  Box

Here is an example which you can work off of:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
<html>
<head>
<title>Q26364285</title>
<script type="text/javascript">

function showSelected() {
   var selectBox = document.getElementById("selection");
   var selectShow = document.getElementById("selected");
   var txt = "";
   for (var i = 0; i < selectBox.length; i++) {
       if (selectBox.options[i].selected) {
           txt += selectBox.options[i].text + "<br/>";
       }
   }
   selectShow.innerHTML = txt;
}

</script>
</head>
<body>
<select id="selection" multiple onchange="showSelected();">
  <option value="1">Option 1</option>
  <option value="1">Option 2</option>
  <option value="1">Option 3</option>
  <option value="1">Option 4</option>
  <option value="1">Option 5</option>
</select>
<br/>
<div id="selected"></div>
</body>
</html>
Random Solutions  
 
programming4us programming4us