dcsimg
Implement a "div" that can be programmatically scrolled
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Srivalli_Chavali
Posted On:   Tuesday, March 1, 2005 02:23 PM

			

I'm wondering how one could implement a "div" that can be programmatically scrolled.

I have a "div" element with both horizontal and vertical scrollbars.
The "div" element internally has a table with 100 rows.
Only 10 rows are visible at a time.
I want to PROGRAMMATICALLY scroll the "div" so that the rows from 70 to 80 are visible.

I'm a newbie to javascript.
hence any help is greatly appreciated!

nevermind

Posted By:   Srivalli_Chavali  
Posted On:   Tuesday, March 1, 2005 03:32 PM

Hi,
I could get it working using the scrollTop property of the div element.

document.getElementById('scrollingDivElement').scrollTop = obj.offsetTop;

obj is the 70th row object.

-Srivalli.
About | Sitemap | Contact