File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Problem with row focus and scroll Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Problem with row focus and scroll" Watch "Problem with row focus and scroll" New topic
Author

Problem with row focus and scroll

Anusha Reddy
Greenhorn

Joined: Dec 11, 2008
Posts: 4
I have a table with a set of rows. And set color to the rows when up/down arrows are pressed. The scroll bar moves down when down arrow is pressed and moves up when up arrow is pressed.

But in my code, when i press down arrow on the last row, the focus should go to the first row. here to set focus i have just set colors to the corresponding rows. The problem is.. when i have more rows, when i try to scroll top from last row, focus is going to the first row, but as the scroll bar remains down, the first row is not visible. How can i move my scroll bar to the row focused?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Do you have code that figures out where the row is located on the page and than you use window.scrollTo() to move there?

Eric
Anusha Reddy
Greenhorn

Joined: Dec 11, 2008
Posts: 4
no i dont have
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with row focus and scroll