Moving Focus

  • Thread starter Thread starter Big E
  • Start date Start date
B

Big E

I'm using ASP.net and SQL Server.
I have 3 phone number textboxes. 1 for area code. 1 for first 3 numbers and
1 for last 3 numbers.

What I want to do is when user types in the 3 characters for area code have
the focus of the control move to the next textbox for first 3 numbers.

Basically once the textbox has reached a certain length of characters have
the focus move. I can find some ways with Javascript. Are there any ways to
use Server side code. I'm not great at Javascript.

Thanks.

Big E
 
Big E said:
I'm using ASP.net and SQL Server.
I have 3 phone number textboxes. 1 for area code. 1 for first 3 numbers and
1 for last 3 numbers.

What I want to do is when user types in the 3 characters for area code have
the focus of the control move to the next textbox for first 3 numbers.

Basically once the textbox has reached a certain length of characters have
the focus move. I can find some ways with Javascript. Are there any ways to
use Server side code. I'm not great at Javascript.

Thanks.

Big E

Sorry, no

As the focus is strictly client-side, you CAN NOT control it from the server!
Stick with the javascript that you have found. You can add them through
"Attributes": myTextBox.Attributes["onkeyup"] = "gotonextinput()";

Hans Kesting
 
Back
Top