Click here to Skip to main content
15,914,452 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I want to make scrolling div. I am using this function to scroll div:
C#
function ScrollUp() {
  document.getElementById('frameDiv').scrollTop +=30;
  return false;
}
function ScrollTop() {
  document.getElementById('frameDiv').scrollTop = 0;
}
function ScrollDown() {
  document.getElementById('frameDiv').scrollTop -= 30;
  return false;
}


but it's not working properly in FireFox.
Thanks.
Posted
Updated 13-Dec-10 18:59pm
v2
Comments
JF2015 14-Dec-10 1:00am    
Edited to improve code readability.
Abdul Quader Mamun 14-Dec-10 2:45am    
Correct question title.

Something similar discussed here[^]. Have a look at the thread and try the resolution proposed.
 
Share this answer
 
Try this,
<div id="divId" style="overflow-y: scroll">
'For vertical scroll bar
 
Share this answer
 
v2
Comments
niravsahayata 14-Dec-10 3:44am    
thanks..
but i dont want to show user a scroll bar...

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



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