[thelist] Limiting length of textarea field

Tris beertastic at gmail.com
Fri Jan 5 01:58:39 CST 2007

I built this site, and on the page above, I've used a javascript to
limit text in the bottom box..
Feel free to steal it... I mean liberate it ;-p

let me know if you need help..!


On 04/01/07, Anthony Baratta <anthony at baratta.com> wrote:
> Here's a better option...
> How are you allowing a printable option? If you offer a print button, you can use a "print media" CSS file "hide" the textarea, and replace it with a DIV, and copy the text in the textarea to the now visable div via JS.
> This way you can get all the text visible with the print out - but postable to the web server.
> Hope that makes sense.
> -----Original message-----
> From: "FayeC" ftarzwell at fayec.com
> Date: Thu, 04 Jan 2007 12:54:03 -0800
> To: thelist at lists.evolt.org
> Subject: [thelist] Limiting length of textarea field
> > I was given a request to limit the textarea's length to the size of
> > the visible area of a textarea. This is to allow the printed copy to
> > have the same content as the form sent by email.
> > So I found a javascript that limits the number of characters of a textarea.
> > It works fine but since it doesn't consider a line break a character
> > people can still enter lines and lines of text beyond the visible area
> > of the textarea as long as there are still characters to be used.
> >
> > I have a 7 row, 68 column textarea and I limited the characters to
> > 475. It works fine if you type a straight line of 475 characters but
> > if you break the line after a few words on each line you can go way
> > beyond the visible area which means that even though the email will be
> > sent with the correct content, the printed copy won't.
> > Doesn't anybody know a way to limit the content to the amopunt of lines as well?
> >
> > Thanks,
> >
> > FayeC
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !

When a person can no longer laugh at himself, it is time for others to
laugh at him.
Thomas Szasz

More information about the thelist mailing list