after submitting textarea on enter, won't focus back in textarea properly (IM type thing)
<p>I have a problem with my form.</p>

<p>The idea is that the message is typed in the textarea, enter is hit to submit the form, ajax script is run, and the message is displayed, much like instant messenger. The problem is, that after the ajax is run i cannot refocus back into the textarea. Instead, I hit enter and the line below is focused. Here is my javascript:</p>

<pre><code>if(event.keycode==13){
    document.forms['sendmessage'].submit();
    document.forms['sendmessage'].msg.value="";
    document.forms['sendmessage'].msg.focus();
    }
</code></pre>

<p>msg is the name of the textarea. I'm not sure how to fix this problem. (the ajax is run on the form submitting)</p>
