dlcnet
asked on
dropdown menu to populate a textarea
Hi Experts!
I have a question realted to a dropdown menu which populates a textfield. I have the following code. The problem is the following:
I have 4 options in the dropdown menu. The textarea must be populated with only 2 selected options.
When I change the option from the dropdown it also changes in the textarea overwritting the previous selected one. I wanted that the first option selected is still there and the 2nd is added after the first one.
How this can be done?
Thank you in advance!
I have a question realted to a dropdown menu which populates a textfield. I have the following code. The problem is the following:
I have 4 options in the dropdown menu. The textarea must be populated with only 2 selected options.
When I change the option from the dropdown it also changes in the textarea overwritting the previous selected one. I wanted that the first option selected is still there and the 2nd is added after the first one.
How this can be done?
Thank you in advance!
function select(source,dest) {
var destFeld = document.getElementById(dest);
destFeld.value = source.value;
}
ASKER
@ Zvonko:
Thanks! It works, but it adds the 2nd option after the 1rst one. I would like to have it on the next row.
Thanks! It works, but it adds the 2nd option after the 1rst one. I would like to have it on the next row.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
@ Zvonko: Many thanks for the quick solution!
You are welcome.
Open in new window