It's not a secret anymore!*
The moose likes HTML, CSS and JavaScript and the fly likes Scroll Rows of a Table One at a Time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply locked New topic

Scroll Rows of a Table One at a Time

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I have been struggling to use keyboard keys to scroll rows of a table up or down one at a time (I have a vertical scrollbar at right hand side of a table.)

I first highlight the first row of the table when the page is loaded. It is working now.

Then, I tried to work out some JavaScript code to move the highlighter up or down by pressing the keyboard up arrow key or down arrow key. The code is not working. Would someone kindly take a look at the code:

[ July 02, 2007: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60817

Please continue any discussion in the original post on this topic.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
It is sorta covered in the JavaRanch Style Guide.
subject: Scroll Rows of a Table One at a Time
Similar Threads
Using Up/Down Arrow Key to Move in a table
How to Detect the Highlighted Row Has Reached the Top of a Table?
Highlight First Row by Default
catching ascii key codes in javascrip
Two HTML Elements Use the Enter Key to Invoke Two Different Functions