iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old March 17th, 2008, 09:27 AM   #1
New Member
 

Join Date: Aug 2006
Location: Bangalore
Age: 25
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 camarun20 is on a distinguished road
[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
camarun20 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 17th, 2008, 11:19 AM   #2
Most Reputable Member
 
spinal007's Avatar
 

Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,683
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Rep Altering Power: 0 spinal007 has a spectacular aura about spinal007 has a spectacular aura about
Re: how to invoking the button through keyboard enter after entering the password ?

<input type="password" onkeypress="if(event.keyCode == 13) this.form.submit()" ...
__________________
Diego - Web-Developer & London SEO Expert
jQuery Plugins: Multiple File Upload, Star Rating, FCKEditor | NEW: XML to JSON
spinal007 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 18th, 2008, 02:20 AM   #3
New Member
 

Join Date: Aug 2006
Location: Bangalore
Age: 25
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 camarun20 is on a distinguished road
Re: how to invoking the button through keyboard enter after entering the password ?

Thanks buddy . This one is working fine..
camarun20 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 and ActionScript 3 November 5th, 2007 05:09 PM
[SOLVED] Selected radio button value Pugger JavaScript 8 November 3rd, 2007 09:16 AM
How Many Keyboard Keys tox0tes Flash and ActionScript 3 October 4th, 2007 05:14 PM
Keyboard! crackafaza The Café 18 September 20th, 2007 04:59 PM
[SOLVED] Disable Button while using Tabs Anonymous User JavaScript 1 September 14th, 2004 05:12 AM


Search Engine Optimization by vBSEO 3.2.0 RC8