Jump to content

Recommended Posts

I don't know that a textarea HAS a max number of characters. But if you are using GET in your form field, you have a limit if... around 2000 characters I believe, though I don't remember exactly how much. POST will be limited by the settings in your php.ini file, as well as the RAM on the processing computer.

 

So, while the textarea may not have a maximum number of characters (I'm not 100% sure on that), you will have limits to how much data can be transmitted by that textarea.

<!-- Begin
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}
// End -->
</script>

 

Place in <body>

 


<!-- textCounter() parameters are:  text field, the count field, max length -->

<form name=myform action="YOUR-SCRIPT.CGI">
<font size="1" face="arial, helvetica, sans-serif"> ( You may enter up to 125 characters. )<br> //change 125
<textarea name=message wrap=physical cols=28 rows=4 onKeyDown="textCounter(this.form.message,this.form.remLen,125);" // change 125 to anything you wish
onKeyUp="textCounter(this.form.message,this.form.remLen,125);"></textarea> // change to same as abovce
<br>
<input readonly type=text name=remLen size=3 maxlength=3 value="125"> characters left</font> // change 125
</form>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.