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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:22:25+00:00 2026-06-14T00:22:25+00:00

The problem is only happening in Internet Explorer. In any other browser I can

  • 0

The problem is only happening in Internet Explorer. In any other browser I can submit the form by hitting enter on my keyboard, in IE8 I have to actually click the button.

I searched around for fixes for a while and found a few things but it’s still not working. The javascript I’m using should be looking for keycode 13, which is enter, but when I hit enter the field clears itself without submitting the form and the keycode is not triggered. The keycode thing only returns results for letters and not for shift/enter.

Here’s the HTML my current solution:

    <form action="chatscreen.php" name="loginform" method="post"> 
        <p>Please enter your name to continue:</p> 
        <label for="name">Name:</label> 
          <input type="text" name="name" id="name" onkeyup="whichButton("loginform","enter")"/> 
        <button type="submit" name="enter" id="enter" value="Enter">Button</button>
    </form> 

And here’s the javascript I tried to implement as a fix:

 <script type="text/javascript">
    function whichButton(formname,elementname) {
    alert("got a key = " + event.keyCode);
    if (event.keyCode === 13) {
    var followingInput = document.getElementById(elementname);
    document.formname.elementname.click();
    }
    }
 </script>
  • 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-14T00:22:26+00:00Added an answer on June 14, 2026 at 12:22 am
    <script type="text/javascript">
        function whichButton(formname,elementname) {
           var keyID = (window.event) ? event.keyCode : keyEvent.keyCode;
           if (keyID === 13) {
              var followingInput = document.getElementById(elementname);
              document.formname.elementname.click();
           }
        }
     </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The problem is only happening with one file when I try to do a
I have a strange problem that is only happening in a single location. I
This problem is only happening in Google Chrome on Mac OS X (Chrome 17).
I have a problem with Internet Explorer. But before proceeding my question let me
I have a rather odd CSS problem. I am bringing in an Internet Explorer
I have a problem in IE. Hitting enter when the focus is on the
This problem has only cropped up recently, but I couldn't find any reference to
Problem: Only doGet gets called when I expect doPost to be called. I have
UPDATE: I've realized that the below problem only occurs if the user has already
First of all: This question is not directly programming related. However, the problem only

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.