
How to make a dropdown box that adds text to a message box?
Moderator: General Moderators
-
lucas20042004
- Forum Newbie
- Posts: 7
- Joined: Mon May 15, 2006 7:39 am
How to make a dropdown box that adds text to a message box?
Hi, How would I make a dropdown list then select text from it and that would automatically be copied into a message box. See pic below:


-
lucas20042004
- Forum Newbie
- Posts: 7
- Joined: Mon May 15, 2006 7:39 am
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Something like:
And for the form:
Code: Select all
<script>
function setTextArea(obj) {
document.myform.mytextarea.value = obj.value;
}
</script>Code: Select all
<textarea id="mytextarea" ></textarea>
<form id="myform" >
<select onSelect="setTextArea(this)" >
...
</select>(#10850)