Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Friday, February 29, 2008

Auto Scrolling the Text Content


Call this function on the button click or other controls
//To auto scroll textbox

function autoScroll()
{ //alert("Auto ");
var d=document;
var ta, rng;
if(d.all){
ta=d.all["txtResult"];
if(ta && ta.createTextRange)
{
rng=ta.createTextRange();
//alert(rng);
rng.collapse(false);
rng.select();
}
}
}