• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

On Key Press select a row in table

 
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Need code to implement.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
View the source...??

Eric
 
Patricia Samuel
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
To get a wish, you need a genie. To get a genie, you need a lamp. To get a lamp, you need a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic