Focus on Textboxes Auto Tab and Shift-Tab
Posted on 2011-09-25
On my web page there are 7 textboxes that can hold only one character each. When the user types a letter in the textbox, I want the focus to be set to the next textbox automatically.
Here is the problem. I also want the user to be able to go back to the previous textbox or any of the textboxes, if they wish, and be able to enter a new character. The user should be able to use the Shift-Tab keyboard combination that would take them to the previous textbox and highlight whatever is in that box so that the information in the textbox can be changed. If they are on the last textbox, I want them to be able to use the Shift-Tab keyboard combination several times and be able to go to the first textbox and enter all new information if they wish.
The code behind is Visual Basic on this webpage that is being developed in Visual Studio 2010.
An old Marine