We help IT Professionals succeed at work.
Get Started

Help needed - Tab key just skips over field in VB Script / HTA

Scootman78
Scootman78 asked
on
1,028 Views
Last Modified: 2012-05-09
I have what I think is a strange problem with my VB Script code and the "window.event.KeyCode" that I use to move from field to field in the HTA form.   What I want to do with the form is have the user go from the first input box on the form to the second input box.  The second, third, and fourth input boxes are in a table.  The problem right now though is when I hit the tab key on the keyboard when the first input box has the focus, it skips the second input box and goes right to the third.  When I keep hitting the tab key, it just keeps skipping over the second input box, but has no problems with every other input box.

Does anyone have any idea why the tab key isn't working correctly with my code?

By the way, whatever the solution is, I can't get rid of the code that makes sure only numbers can be entered through the first box.  I also don't want to use "tabindex" to determine the tab order because in my finished form, the tab order is dynamic based on what fields have values.

Appreciate any help you can give!
Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014
Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE