I have a drop-down list. When an item is selected, five textboxes (all in the same form) appears in the page. One- or two-digit numbers can be entered in those textboxes. After selecting an item in the dropdown list, focus goes to TextBox1. Each time the user press Enter, the form is submitted.
What I want is to move the focus to the proper place after the user press Enter: if user is in TextBox1, after Enter focus moves to Textbox2. If user is entering data in TextBox 3, focus moves to TextBox 4. Or, finally, if user is in TextBox5 (the last one), focus moves to the initial dropdown list.
My problem is that:
1) I cannot use JS onkeydown in each textbox, because user can enter one or two digits in the textbox.
2) I tried with JS onsubmit, but that instruction is for the whole form. How can I know which textbox was completed?