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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:51:12+00:00 2026-05-20T17:51:12+00:00

I noticed the new Facebook way of sending comments on status. Basically when you

  • 0

I noticed the new Facebook way of sending comments on status. Basically when you write your comment you have no buttons to click but the “enter” key to press in order to submit the comment. Now I’d like to make this thing too. And I was thinking about the possible solutions. It comes to my mind that <input> are submitted with the enter button pressed, but that textarea are not.

  • Either I write an input (type text) and set an height witch covers more than a row
  • Or I have to add a textarea and somehow submit that form when the user press enter.

Which is the best? And if the answer = second, how could I do that?

  • 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-20T17:51:13+00:00Added an answer on May 20, 2026 at 5:51 pm

    It depends how you define best.

    The first is best if you want a really easy solution that doesn’t require javascript

    The seconds is best if you wish to allow linebreaks in the text.

    If you wish to use the text area solution you can do something like this: (uses jQuery)

    <textarea id="mytextarea"></textarea>
    <script>
    $('#mytextarea').keypress(function(e){
      if(e.keyCode == 13 && !e.shiftKey) {
       e.preventDefault();
       this.form.submit();
      }
    });
    </script>
    

    The good thing about this solution is that it still allows people to do linebreaks, if they just hold in the shift key when they hit enter. Just like on skype.

    Live example here: http://jsfiddle.net/MEtGg/

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

Sidebar

Related Questions

I've just noticed this following , relatively new thing on Facebook, when you upload
I'm new to jQuery and have noticed someone go: var $this = $(this); Why
I have noticed some developers picking up new skills and moving from one platform
I had hosted two apps a month before but today morning i have noticed
Simple question...I've noticed several large sites (Facebook, Twitter, etc) have ditched the idea of
I have a facebook iframe app, and I have just noticed that a basic
Those who use Facebook have probably noticed the recent change to the photo albums
I noticed that new versions of doxygen (I have 1.8.1.1) produce class lists where
I'm pretty new to iOS, but I'm getting there, but have come across a
I decide to write some applications using facebook and django (or even twisted, but

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.