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 641007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:00:57+00:00 2026-05-13T21:00:57+00:00

I have a form, very basic, and when I hit enter key nothing happens

  • 0

I have a form, very basic, and when I hit enter key nothing happens in firefox, but in google chrome it submits. Haven’t tried other browsers yet…

Nothing happens at all when hitting enter in firefox.

When clicking the submit button it works fine in both browsers.

The form is inside a DIV, and the form has javascript too, here is the form simplified:

<form id="nav_form_main" name="nav_form_main" action="bincgi/sql_query.php" target="iframe001" method="get" onSubmit="reset_pager();">

<input type="button" name="nav_submit" id="nav_submit" value="Search" onClick="reset_and_subm();" style="width: 58px; font-size: 13px;">

//some other elements...

</form>

and here is the js:

function reset_pager(){
    byId("p").value = 0;
}
function reset_and_subm(){
    byId("p").value = 0;
    document.forms["nav_form_main"].submit();   
}

The reset_pager function is not called at all… which is strange because it is an “onsubmit” function. So it is like the form isn’t submitted at all.
However, the results in the targeted iframe appear fine, without any problem.

Any ideas?

Thanks

  • 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-13T21:00:57+00:00Added an answer on May 13, 2026 at 9:00 pm

    Enter for submit is only triggered if <input type="submit> exists on the form. You can add a hidden one for this purpose, but keep in mind that it will submit the form and bypass the onclick event you’re looking to capture. You’ll need to patch into the onsubmit action of the form to run your function.

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

Sidebar

Related Questions

I have a very small form where a user can enter their zip code
I have very basic pagination script and search form with ~4 fields, and action=get
I have to do a very basic thing with javascript: A form field is
This is a very basic concept, but something I have never been able to
I have a very basic form at http://www.happyholidaylites.com/contact.html and it is working great. When
The very basic issue all developers face: Whenever user submits the form, the password
I have a very basic form, with some very basic validations (though I need
I have created a php person class and a very basic form. The form
I have a very basic email submission form in my ASP.NET MVC 3 app.
I realize that this is probably a very basic question, but I have spent

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.