Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8519961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:23:55+00:00 2026-06-11T06:23:55+00:00

I am currently facing a problem. I need have a form to be fill

  • 0

I am currently facing a problem.

I need have a form to be fill by a user ie:

field1: <input type='text' name='field1'>
field1: <input type='text' name='field1'>
<input type='button' value='Save' name='Save'>

So now I need the way to focus on the ‘Save’ button when a user has filled the last text box in a form, so that even when the user clicks on the ‘Enter’ button the save event get run.

This usually happens automatically but the problem is I have many buttons in my page, now when a user click on save another click event(that I don’t want) gets fired up.

So my question is how do I control what should happen when the ENTER button is clicked, or should I disable this event?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:23:57+00:00Added an answer on June 11, 2026 at 6:23 am

    The way to accomplish that is by using javascript, and I’d suggest you using jQuery.

    $('#mytextfield').change(function(e) {
        $('input[type=submit]').focus();
    });
    

    You can also autofocus an element on HTML5 by adding the attribute autofocus=”autofocus”

    Take a look at the small demo : http://jsfiddle.net/9WmQ5/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on the project. Currently I'm facing a problem, I have 3 UITableView's
Im currently facing the problem that when i try to set focus on some
I'm currently facing new problem with operators. Using following code, I want to make
I'm currently facing a problem which I can not resolve and I really don't
I'm currently facing this problem with ruby on rails 3, devise and facebook oauth.
I'm currently facing a weird problem while executing a command from my bash script.
I'm developing android application with phonegap . Currently I'm facing one problem with inputbox
I am currently working on a Wordpress blog installation. Problem i am facing is
I am currently facing an error called Bad Base64Coder input character at ... Here
Currently I am facing a problem which I am unable to solve after a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.