Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am using the scrolltop method of javascript to scroll at the bottom of the div in my chatroom application but it is working only in IE & not for the higher version browsers.
please provide me the solution
Posted
Updated 18-Oct-11 22:08pm
v2
Comments
Morgs Morgan 21-Oct-11 2:46am    
Do you mind showing the code of how you are using it? only then i can see what you are doing wrong and advise you if possible.

1 solution

XML
try it :
<pre lang="Javascript">
var doc = document.documentElement || document;
doc.scrollTop = 100;

</pre>
for div elements:
<pre lang="HTML">
document.getElementById("TheDivId").scrollTop = 100;
</pre>
I've tested it, it works.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900