Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

On Key Press select a row in table

 
Patricia Samuel
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have table that is scrollable. Whenever user clicks on a row , the row get selected. Now our client wants that whenever UP or Down Arrow key is pressed the row get selected. I am not able to understand how to do this.
<Div style ="overflow-y:auto"
<table >
<c:foreach...>

<tr on click ="calljavascript"><td>

</tr>
</c:foreach>
</table>
<div>

This is just a skelteon to clear what i want. I used on keypress="call javascript" but onkey scrolls Browser not the content of that table. I don't know how to do this. can anyone help me in this dilemma.
Thanks a lot to all
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somethign I did for another Rancher: http://www.pascarello.com/examples/ActiveZebra.html

One thing it needs to do that I never coded in it is to scroll the page if the highlighted roww goes off the screen.

Eric
 
Patricia Samuel
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Need code to implement.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
View the source...??

Eric
 
Patricia Samuel
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can anyone help me to select a row in table using arrow keys.
I used this link to apply the functionality

http://projects.arkanis-development.de/table_navigation/

but nothing was helpful for me...it does not work on key press...

I did exactly the same way it is using...but instead the table scrolls it is scrolling my Window.(Firefox)

Or give me some alternative solution to implement this.

Thanks
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic