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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:18:53+00:00 2026-05-11T03:18:53+00:00

Well I am trying to submit a form by pressing enter but not displaying

  • 0

Well I am trying to submit a form by pressing enter but not displaying a submit button. I don’t want to get into JavaScript if possible since I want everything to work on all browsers (the only JS way I know is with events).

Right now the form looks like this:

<form name='loginBox' target='#here' method='post'>     <input name='username' type='text' /><br />     <input name='password' type='password' />     <input type='submit' style='height: 0px; width: 0px; border: none; padding: 0px;' hidefocus='true' /> </form> 

Which works pretty well. The submit button works when the user presses enter, and the button doesn’t show in Firefox, IE, Safari, Opera and Chrome. However, I still don’t like the solution since it is hard to know whether it will work on all platforms with all browsers.

Can anyone suggest a better method? Or is this about as good as it gets?

  • 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. 2026-05-11T03:18:54+00:00Added an answer on May 11, 2026 at 3:18 am

    Update 2022: Use this instead

    <input type="submit" hidden /> 

    Notice – Outdated answer
    Please do not use position: absolute in the year 2021+. It’s recommended to use the hidden attribute instead. Otherwise, look down below and pick a better, more modern, answer.

    Try:

    <input type="submit" style="position: absolute; left: -9999px"/> 

    That will push the button waaay to the left, out of the screen. The nice thing with this is, you’d get graceful degradation when CSS is disabled.

    Update – Workaround for IE7

    As suggested by Bryan Downing + with tabindex to prevent tab reach this button (by Ates Goral):

    <input type="submit"         style="position: absolute; left: -9999px; width: 1px; height: 1px;"        tabindex="-1" /> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 106k
  • Answers 106k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The video card won't participate in any activity unless it… May 11, 2026 at 8:59 pm
  • Editorial Team
    Editorial Team added an answer GS, you're right, folders under Program Files\Microsoft Office\Office11 will bear… May 11, 2026 at 8:59 pm
  • Editorial Team
    Editorial Team added an answer If you want to know if your threads are blocked,… May 11, 2026 at 8:59 pm

Related Questions

I am trying to create a form that posts data via jQuery and populates
I'm trying to generate a vector graphic from an area in a bitmap image,
I am trying to approximate shape boundaries by using Fourier descriptors. I know this
I made an FPS game with MSVC++ which is running very well on Windows.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.