You need to listen to the focus event in the text area for example :
<textarea onfocus="setCursorAtTheEnd(this,event)"/>
And then in your javascript code:
function setCursorAtTheEnd(aTextArea,aEvent) {
var end=aTextArea.value.length;
if (aTextArea.setSelectionRange) {
setTimeout(aTextArea.setSelectionRange,0,[end,end]);
} else { // IE style
var aRange = aTextArea.createTextRange();
aRange.collapse(true);
aRange.moveEnd('character', end);
aRange.moveStart('character', end);
aRange.select();
}
aEvent.preventDefault();
return false;
}