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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:59:24+00:00 2026-05-24T08:59:24+00:00

I have a text area in my form which accepts all possible characters from

  • 0

I have a text area in my form which accepts all possible characters from user. i restrict the character count entered in the textarea to 10 . When the user enters a text with special character say `SampleTxt’ the character count in textarea is 10. But when i get the value of text area in the form, the text becomes ‘SampleTxt’

and the count of the text becomes 21. How to over come this issue?

function toCount(in) {
    var inObj=document.getElementById(in);
    var re='/\r\n|\n|\r\|\f/g';
    var i=0;
    while(re.match(inObj.value)){i++;}
    var length=characters - (inObj.value.length+i);
    if(length <= 0) {
        inObj.value=inObj.value.substr(0,characters);
document.getElementById("remcount").innerHTML = inObj.value.length;
        }
    }

Jsp

< html:textarea property="descTxt" styleId="desc" onkeyup="toCount('desc');" />
  • 1 1 Answer
  • 1 View
  • 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-24T08:59:24+00:00Added an answer on May 24, 2026 at 8:59 am

    It sounds like maybe you are getting the text of the textarea with o.innerHTML when you should be getting the text with o.value.

    Post your actual code for more detailed help.

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

Sidebar

Related Questions

I have a text area which I need to prevent from having javascript entered.
I have a simple form which accepts a Title and a Contents variable from
I have a form which on submit should see if the text area has
I have a text area on my site which shows the user a certain
I have a form with a textarea. Users enter a block of text which
I have a form with a text area input. I'm using JQuery to submit
I have a text-area where text and an image url is entered. Text is
I have a textarea form which takes a large block of text. In this
I'm using str_replace and it's not working correctly. I have a text area, which
I have a text area in HTML where the user can enter text, 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.