You are here: irt.org | FAQ | JavaScript | Form | Q1500 [ previous next ]
Try:
<form> <select onChange="if (this.selectedIndex >-1) { var t=''; for (var i=this.selectedIndex;i<this.options.length;i++) { if (this.options[i].selected) t += this.options[i].value + '\n'; } this.form.myTextarea.value = t; }" multiple> <option value="one">one <option value="two">two <option value="three">three <option value="four">four </select> <textarea name="myTextarea" cols="10" rows="10"></textarea> </form>