Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Make Focus On Text box by using javascript.

Started 1 month, 2 weeks ago by vinay singh
Hi, I am working on a project in which there are two textbox one for user id and other for password. The requirement is that if user enter incorrect user id on that case focus goes to user id text field and if user enters correct user id and wrong password in that case it should show focus on password box. i have written the below code: if(objXMLHttp_Login.responseXML....
Site: C# Forum : C#, VB.NET, WCF, WPF, Silverlight, WF, XAML, .NET 3.0, .NET 3.5, Visual Studio 2008 Forums  C# Forum : C#, VB.NET, WCF, WPF, Silverlight, WF, XAML, .NET 3.0, .NET 3.5,
Visual Studio 2008 Forums - site profile
Forum: ASP.NET & Web Development  ASP.NET & Web Development - forum profile
Total authors: 3 authors
Total thread posts: 5 posts
Thread activity: no new posts during last week
Domain info for: c-sharpcorner.com

Other posts in this thread:

niki d replied 1 month, 2 weeks ago
Hi friend, You can set the focus using following code. document.getElementById(txt_password).focus() For the username also u can use the same way. If this helps please accept my answer.

vinay singh replied 1 month, 2 weeks ago
Hi, As u said user .focus(); but it's not working. it's giving error .focus is not a method. Regards vinay

niki d replied 1 month, 2 weeks ago
then use like this. document.formname.elements[ i ].focus() Here i is the index of the control.

Sriram Ramani replied 1 month, 2 weeks ago
HI , Try this one var a=document.getElementsByTagName("input"); var i; for (i=0;i

 

Top contributing authors

Name
Posts
vinay singh
2
user's latest post:
Make Focus On Text box by using...
Published (2009-11-10 02:20:00)
Hi, As u said user  .focus(); but it's not working. it's giving error .focus is not a method. Regards vinay
niki d
2
user's latest post:
Make Focus On Text box by using...
Published (2009-11-10 03:20:00)
then use like this. document.formname.elements[ i ].focus() Here i is the index of the control.  
Sriram Ramani
1
user's latest post:
Make Focus On Text box by using...
Published (2009-11-10 03:40:00)
HI , Try this one var a=document.getElementsByTagName("input"); var i; for (i=0;i

Related threads on "C# Forum : C#, VB.NET, WCF, WPF, Silverlight, WF, XAML, .NET 3.0, .NET 3.5, Visual Studio 2008 Forums":

Related threads on other sites:

Thread profile page for "Make Focus On Text box by using javascript." on http://www.c-sharpcorner.com. This report page is a snippet summary view from a single thread "Make Focus On Text box by using javascript.", located on the Message Board at http://www.c-sharpcorner.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity