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

  • Home
  • SEARCH
  • 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 7583447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:40:47+00:00 2026-05-30T18:40:47+00:00

When i Pressed Enter/Return in Keyboard it submits the form without going through my

  • 0

When i Pressed Enter/Return in Keyboard it submits the form without going through my javascript function in the Submit button of the Form.

I’m thinking of manipulating the keyboard command when pressed but i think that would take time.

so, is there any short way of doing so? like an event in the form/button?

Any Answer will help.
Thank you.

PS: sorry for bad explanation.

  • 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-05-30T18:40:48+00:00Added an answer on May 30, 2026 at 6:40 pm

    Assuming “your JavaScript function” is assigned to the submit button’s click handler, it’s obvious why it didn’t work: you didn’t click the submit button. The code to handle a form submission should go onto the form’s submit handler. It will trigger from both submit buttons and Enter key.

    One more critical piece of info: your handler has to return false, or call preventDefault on the event; if you don’t, the form will still submit after your code exits.

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

Sidebar

Related Questions

I have a textarea that when a users pressed enter/return on their keyboard, I
I have a form with a default button set.So when i press enter,form is
I've blocked Enter (return) key, actually, transformed it in Tab key. So when pressed
In this function, based on the value of an input, the form submit is
I bound the event <Return> to a Button, thinking that this would cause the
I want a certain functionality when Enter key is pressed on a Button. When
In ASP.net Webforms how do you detect which Textbox someone pressed enter? Please no
I have an input field which when the enter key is pressed (as there
I must have pressed on the wrong button at some point, and now when
I'm trying to validate a UI change when Enter key is pressed. The UI

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.