make moving between textboxes using arrows instead of tab

Discussion in 'JavaScript' started by hasanbasri, Feb 28, 2010.

  1. #1
    hello everybody

    I have number of textboxes , I want to move betwoeen them using arrows in keyboard (up, down, left , right) instead of tab.

    any ideas ?

    thanks
     
    hasanbasri, Feb 28, 2010 IP
  2. wing

    wing Active Member

    Messages:
    210
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    58
    #2
    You could use the onkeypress event to set focus on your desired elements.
     
    wing, Feb 28, 2010 IP
  3. hasanbasri

    hasanbasri Peon

    Messages:
    78
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thank you so much... but really that is what I already have as an idea but i'm seeking for easest ideas because I may have more than 50 textbox in one page
     
    hasanbasri, Mar 1, 2010 IP
  4. Nyu

    Nyu Peon

    Messages:
    79
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I dont think there will be any easier sollution. With tab you can just go forward and backward (Tab and Shift+Tab) through the textboxes. But if you also want to use the arrow keys i think you have to use the method wing already posted.
     
    Nyu, Mar 1, 2010 IP
  5. hasanbasri

    hasanbasri Peon

    Messages:
    78
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanks for both of you (you and wing) :) :)
     
    hasanbasri, Mar 1, 2010 IP