Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using java,html,jsp in my project & i want to move the cursor from one textbox to another & as soon as the user enters the first value, the cursor should go on to next field the coresponding value which i have to assign
Posted

1 solution

From your requirement I can make out the following steps.

  1. Decide the criteria when exactly you want to have the focus on the second TextBox.
    For Example - when MaxLength reaches, the focus will go to second TextBox.
  2. Use the javaScript onkeypress Event[^] for the first TextBox and call one function.
  3. On that function, check if the criteria/condition is satisfied or not and just use HTML DOM focus() Method[^] to focus on the TextBox you want to give focus on.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900