"Stefano Incontri" <st********@iol.it> wrote in message news:<pa****************************@iol.it>...
how can I scroll a TextArea to its last position at the bottom?
In IE, collapsing a TEXTAREA range to the end and selecting it should
result into a scrolldown; as for other browsers I don't think it's
currently doable.
<textarea id="ta" rows="5" cols="30">
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
</textarea>
<input type="button" value="scroll" onclick="f('ta')" />
<script type="text/javascript">
function f(ta_id){
var d=document, ta, rng;
if(d.all){
ta=d.all[ta_id];
if(ta && ta.createTextRange){
rng=ta.createTextRange();
rng.collapse(false);
rng.select();
}
}
}
</script>