Option to limit the number of caracters in <textarea> ?

Discussion in 'HTML' started by freeposte@gmail.com, Dec 1, 2008.

  1. Guest

    Good morning dear members of the alt.html newsgroup.

    Is there any option to limit the number of characters in a text area
    (<textarea> tag) ?

    Many thanks.

    freeposte
    , Dec 1, 2008
    #1
    1. Advertising

  2. +mrcakey Guest

    <> wrote in message
    news:...
    > Good morning dear members of the alt.html newsgroup.
    >
    > Is there any option to limit the number of characters in a text area
    > (<textarea> tag) ?
    >
    > Many thanks.
    >
    > freeposte


    Only by using JavaScript.

    +mrcakey
    +mrcakey, Dec 1, 2008
    #2
    1. Advertising

  3. wrote:

    > Good morning dear members of the alt.html newsgroup.


    19:00 is an odd time for "good morning".

    > Is there any option to limit the number of characters in a text area
    > (<textarea> tag) ?


    It depends on what you mean by "option" and "limit" and "is there". But the
    interesting question is why you would do this.

    I'd suggest starting from
    http://www.cs.tut.fi/~jkorpela/forms/textarea.html
    which should at least help you to formulate a useful question.

    (Within HTML, the answer is of course "No", but you surely knew this - it
    was easy to check this from HTML specifications and references, wasn'it it?)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Dec 1, 2008
    #3
  4. Guest

    On 1 déc, 18:01, "Jukka K. Korpela" <> wrote:
    > wrote:
    > > Good morning dear members of the alt.html newsgroup.

    >
    > 19:00 is an odd time for "good morning".
    >
    > > Is there any option to limit the number of characters in a text area
    > > (<textarea> tag) ?

    >
    > It depends on what you mean by "option" and "limit" and "is there". But the
    > interesting question is why you would do this.
    >
    > I'd suggest starting fromhttp://www.cs.tut.fi/~jkorpela/forms/textarea.html
    > which should at least help you to formulate a useful question.
    >
    > (Within HTML, the answer is of course "No", but you surely knew this - it
    > was easy to check this from HTML specifications and references, wasn'it it?)
    >
    > --
    > Yucca,http://www.cs.tut.fi/~jkorpela/


    That's right. thanks.
    , Dec 1, 2008
    #4
  5. Tim Greer Guest

    wrote:

    > Good morning dear members of the alt.html newsgroup.
    >
    > Is there any option to limit the number of characters in a text area
    > (<textarea> tag) ?
    >
    > Many thanks.
    >
    > freeposte


    You can try some methods, such as JavaScript, but you should always
    ensure you do some checking server-side. Anything too large, either
    reject immediately and warn the user, or truncate it to an acceptable
    length. There are simply too many methods people could use to bypass
    any attempt to put a limit on the characters, so anything you can do
    would be only an attempt to make things more user friendly, if their
    browser supports whatever you feature impose for that purpose.

    So, if you need a limit imposed for more than the visual aspect while
    someone fills in the textarea field, be sure the program/script it
    submits that data to does the real checking. Also, I'd recommend
    against forcing the feature (JavaScript, or whatever) to make people
    "able" to submit it, but just to enhance it if they happen to have it
    enabled. Same rule as anything and any design for function on a site,
    I suppose.
    --
    Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
    Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
    and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
    Industry's most experienced staff! -- Web Hosting With Muscle!
    Tim Greer, Dec 1, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    4,610
    Alain Hogue
    Jan 9, 2006
  2. =?Utf-8?B?Sm9u?=

    Why are these caracters not being display correct

    =?Utf-8?B?Sm9u?=, Aug 25, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    494
    John Timney \(MVP\)
    Aug 25, 2006
  3. luca72

    string caracters:

    luca72, Apr 22, 2010, in forum: Python
    Replies:
    2
    Views:
    284
    Bruno Desthuilliers
    Apr 22, 2010
  4. Gir

    Special caracters

    Gir, Jul 27, 2004, in forum: ASP .Net Mobile
    Replies:
    2
    Views:
    214
    Guest
    Jul 27, 2004
  5. arno

    RegExp and special caracters

    arno, Feb 4, 2006, in forum: Javascript
    Replies:
    7
    Views:
    132
    Dr John Stockton
    Feb 7, 2006
Loading...

Share This Page