Moving Focus

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
 
H

Hans Kesting

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top