Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    mvoing the focus up/down using up/down arrow key in checkbox

    i have a single checkbox in a div whose scroll property is set to true

    the checkbox is populated with data filed frm database. so depending on the number of data items , there will be the checkboxes

    i want that on pressing down/up arrow key the focus shld shift to the previous/next checkbox , and on pressing spacebar the checkbox shld be selected / deselected and on presing tab the focus shld come out of teh div control have checkbox on to the next control

    at presnet before using the below code if i press tab the cursor moves to next checkbox, so if i have 50 checkboes in the div i need to press tab 50 times to shift to next control

    how do i do it using javascript

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,017
    Thanks
    203
    Thanked 2,538 Times in 2,516 Posts
    Quote Originally Posted by svibuk View Post
    i have a single checkbox in a div whose scroll property is set to true

    the checkbox is populated with data filed frm database. so depending on the number of data items , there will be the checkboxes

    i want that on pressing down/up arrow key the focus shld shift to the previous/next checkbox , and on pressing spacebar the checkbox shld be selected / deselected and on presing tab the focus shld come out of teh div control have checkbox on to the next control

    at presnet before using the below code if i press tab the cursor moves to next checkbox, so if i have 50 checkboes in the div i need to press tab 50 times to shift to next control

    how do i do it using javascript
    What "below code"? And surely if you want to select checkbox#50 you simply use the mouse.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •