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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:58:34+00:00 2026-06-04T09:58:34+00:00

First time here :) I have a textarea and an input and I would

  • 0

First time here 🙂

I have a textarea and an input and I would like that, when something is typed into the texarea, it copies it to the input onkeypress. But the input must be limited to 10 characters. Then I would like to add 5 numbers to the end of the value of the input

EG:
Textarea content: “Hello world, how are you?”
Input content: “Hello worl12345”

I have tried this and this
but on the second one I think its really messed up code and requires some “cleaning”. Besides, it lacks the function of adding 5 numbers at the end.

  • 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-04T09:58:35+00:00Added an answer on June 4, 2026 at 9:58 am

    You could use javascript to get the text area’s value example:

    var str = document.getElementById("text").value;
                              //id of text area needs to be set to "text"
    

    then you could use the substring function to cut the string off after 10 characters

    var finishedString = str.substring(0,10);
    

    then if you wanted to just add 12345 to the end.

    finishedString = finishedString + "12345";
    

    and then use getElemendById of the input area to set it to the finished string.
    You could put this all in a function and then call it on key pressed.

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

Sidebar

Related Questions

this is my first time posting here, I have a question which I have
i have a problem with triggering the multiple alarm at first time , here
Sorry, this's my first time to ask a question here. So, I don't have
Here's the scenario: if this is a user's first time logging into my web
this is my first time posting on here and have read alot of helpful
It's my first time asking here (I have visited the site several times, but
So here I have this first time app I'm working on. When I run
first time posting here. I'm a beginner in jquery and i ran into some
first time using Asp.Net MVC here. I have a model class defined with 3
Thanks for the help in advance. First time posting here. I have included a

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.