View Single Post
  #1 (permalink)  
Old Mar 17th, 2008, 12:27
camarun20 camarun20 is offline
New Member
Join Date: Aug 2006
Location: Bangalore
Age: 24
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] how to invoking the button through keyboard enter after entering the...

Hi All,

I am in the process of building a web application. In the initial login page , I am allowing the user to type the user name and the password.

As per my requirement I need to submit the form by pressing enter (not by clicking thru mouse).

I am able to set the focus on button through "document.getElementById("button").focus()" on page load. But when i try entering the password the focus changes from button to the text box and as a result the enter key is not redirecting the page.


My question is, IS there any way by which we can set the focus to the button after entering the password , so that my keyboard enter will trigger the form submit?

Please help me in this . Its a urgent requirement

Thanks for your help in advance
Arun Kumar
Reply With Quote