GeeCON Prague 2014*
The moose likes Applets and the fly likes Inconsistent focus on input field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Applets
Bookmark "Inconsistent focus on input field" Watch "Inconsistent focus on input field" New topic
Author

Inconsistent focus on input field

Darren Alexandria
Ranch Hand

Joined: Aug 17, 2007
Posts: 185
Good day!

I have a JSP that has an embedded Applet that acts as input field number 1 and a HTML input field that acts as number 2.
What I need to do:

1. Input data on field number 1.
2. Press Enter key.
3. Focus should transfer automatically to input field number 2.
4. Input data on field number 2.
5. Press Enter key.
6. Repeat steps 4 & 5 until all the necessary data has been inputted.
7. As long as I input field number 1 is not null, the focus always be in field number 2.
8. The cursor focus should return in field number 1 when the all the fields on the field has been set to reset.

Here is the code:



As of the moment, what's happening is that after inputting data on field number 1 and pressing Enter, the focus is still in input number 1. So I would click on field number 2. After inputting data in field number 2, there are times that the expected output is achived there are times that after inputting several data, the cursor focus goes back to the input field number 1 which caused errors.

What can I modify to fix this?

Thanks.

Darren
 
Consider Paul's rocket mass heater.
 
subject: Inconsistent focus on input field