Click here to Skip to main content
15,887,821 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello to all friends

i have a page for register users with several label and textbox and two button that one for submit and other one for cancel.i set first textbox tabindex with "txtFname" ID to "tabindex=1" and to end textbox tabindex with "txtPass" ID to "tabindex=14".i want to, when tabindex=14 and then key tab press,focus to first textbox "i.e txtFname".
how to do this with javascript?

i'm working with asp.net and c#.

tanx in advance.
Posted
Comments
Jim Jos 18-May-12 2:41am    
Just to make sure there is no tabindex defined after tabindex 14 then it automatically recycle to tabindex 1
kiarash M.Y 18-May-12 5:24am    
hi dear JimJos
problem of my code is:
When the cursor in the textbox with tabindex 14 and fill it and then I'll press the tab key, move the focus on url in browser instead focus to textbox with tabindex 1
very tanx for your answer

1 solution

try this...
put this code in the appropriate place...

TextBox1.Focus();
 
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