Posted by cresh on 09/04/07 14:38
Hello all,
I'm in need of some help with inserting text into a textarea. I have
this (below)which actually REPLACES all text in the text area. I just
need the text to be added to existing text there.
/begincode
<head>
<script>
function InsertText(mytext){
document.Form.message.value = mytext;
}
</script>
</head>
......
<input type="button" onclick="InsertText('This text is added.')"
value="AddText">
<textarea name="message" cols="60" rows="5"></textarea>
/endcode
This text replaces what's already in the box if I click the button.
What I want is to add the text when the button is clicked, not replace
what is already in the text area.
Thanks very much for any assistance.
DB
Navigation:
[Reply to this message]
|