Append text into TextArea
<p>I want to append text inside Textarea. The text should be appended immediate after the cursor position and not at the end. </p>

<p>Here is my code:</p>

<p>The HTML:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;textarea id="textarea1"&gt;&lt;/textarea&gt;
&lt;br&gt;&lt;input type="button" value="Write blah blah" onclick="addtxt('textarea1')"&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>The Script:</p>

<pre><code>&lt;script&gt;
function addtxt(input) {
var obj=document.getElementById(input);
obj.value+="blah test 123"
}
&lt;/script&gt;
</code></pre>

<p>The above code is live at: <a href="http://jsfiddle.net/zGrkF/" rel="nofollow">http://jsfiddle.net/zGrkF/</a></p>

<p>Thanks in advance..</p>
