javascript - How to make scroll keep down, but don't want to lock -


i making shoutbox. want when retrieves data keep scroll down. in facebook scroll keep remains down. using javascript goes lock, prevent scroll top. using code :

document.getelementbyid('txthint').scrolltop = 10000;    <div id="txthint" style="width:700px;height:500px;overflow:auto;" > <!-- here data displayed --> </div> 

the problem that, prevents me scrolling up.

try using offsettop property. suggest putting hidden div @ end of div in text scroll down(hidden div should alwasy @ bottom), , should apply scrolltop

document.getelementbyid('txthint').scrolltop = document.getelementbyid('s_hidden').offsettop;    <div id="txthint" style="width:700px;height:500px;overflow:auto;" > <!-- here data displayed --> <div id="s_hidden"></div> </div> 

Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -