i want update textarea content onclock on a input button
for example:
<input type="button" value="Reply" onclick="update('Ahmed')">
<textarea id="comment_content"></textarea>
//i want set textarea content to @/Ahmed/ onclick on the above button
//example for the javascript function
function update(var){
getElementByID('comment_content') = '@/'.var.'/'
//set the textarea to @/Ahmed/
}
I have another question.. i want onclick on the button, i want send the user to the end of the page ( to the new_comment div )
i want javascript code, not jquery
Scrolling to the bottom is: