Sunday, May 17, 2009

How To Set The Foucs On Last Row in TextArea

<script type="text/javascript">
window.onload=function WindowLoad(event)
{
var objControl=document.forms["FrmTestScroll"].elements["textarea1"];
objControl.scrollTop = objControl.scrollHeight;
}
</script>
<form id="FrmTestScroll">
<textarea rows="3" cols="10" name="textarea1">lots of text goes here. it would be on more than one line.</textarea>
</form>


No comments: