[SOLVED] how to invoking the button through keyboard enter after entering the...

This is a discussion on "[SOLVED] how to invoking the button through keyboard enter after entering the..." within the JavaScript Forum section. This forum, and the thread "[SOLVED] how to invoking the button through keyboard enter after entering the... are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 17th, 2008, 12:27
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

  #2 (permalink)  
Old Mar 17th, 2008, 14:19
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,620
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: how to invoking the button through keyboard enter after entering the password ?

<input type="password" onkeypress="if(event.keyCode == 13) this.form.submit()" ...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #3 (permalink)  
Old Mar 18th, 2008, 05:20
New Member
Join Date: Aug 2006
Location: Bangalore
Age: 24
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to invoking the button through keyboard enter after entering the password ?

Thanks buddy . This one is working fine..
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] animated button problem ahwell Flash & Multimedia Forum 3 Nov 5th, 2007 21:09
[SOLVED] Selected radio button value Pugger JavaScript Forum 8 Nov 3rd, 2007 12:16
How Many Keyboard Keys tox0tes Flash & Multimedia Forum 3 Oct 4th, 2007 21:14
Keyboard! crackafaza Webforumz Cafe 18 Sep 20th, 2007 20:59
[SOLVED] Disable Button while using Tabs Anonymous User JavaScript Forum 1 Sep 14th, 2004 09:12


All times are GMT. The time now is 01:10.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43