|
you have to add "multiple" in the select tag to select multiple value. As I have added below:
<select multiple name="sel_list" id="sel_list" size="2" onchange="adOption.selOpt(this.value, 'optval')"></select><br/><br/>
Also, you have to update your delete function. Please see below:
adOption.delOption = function(list, optval) {
var opts = document.getElementById(list).getElementsByTagName('option');;
for(var i=opts.length -1; i >= 0 ; i--) {
if(opts[i].selected == true) {
document.getElementById(list).removeChild(opts[i]);
}
}
}
Let me know is this you want?
|