Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #10487

Re: Limiting # characters in textarea

From BootNic <bootnic.bounce@gmail.com>
Newsgroups comp.lang.php
Subject Re: Limiting # characters in textarea
Followup-To alt.html
Date 2013-08-10 21:57 -0400
Organization BootNic Party Make your vote count!
Message-ID <20130810215745.180fdd44@bootnic.server> (permalink)
References <ku699n$77d$1@speranza.aioe.org> <ku6hbm$t27$1@dont-email.me> <ku6i1b$rdl$1@speranza.aioe.org>

Followups directed to: alt.html

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

In article <ku6i1b$rdl$1@speranza.aioe.org>, Twayne <nobody@spamcop.net>
wrote:

[snip]

> Unfortunately, no, maxlength does not work on textarea. It was added
> to HTML 5 but not all browsers will honor it, Opera in particular. Thus
> my quest for a way to mimic it.

For Opera one could add an invalid pattern attribute. Opera will still not
truncate the input, but it will prevent the form from submitting.

<textarea name=text pattern="^[\w\W]{0,50}$" maxlength=50></textarea>

Followup-To:alt.html


-- 
BootNic                                               Sat Aug 10, 2013 09:57 pm
  Inform all the troops that communications have completely broken down.
  *Ashleigh Brilliant*

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Limiting # characters in textarea Twayne <nobody@spamcop.net> - 2013-08-10 16:54 -0400
  Re: Limiting # characters in textarea Martin Leese <please@see.Web.for.e-mail.INVALID> - 2013-08-10 17:11 -0600
    Re: Limiting # characters in textarea Twayne <nobody@spamcop.net> - 2013-08-10 19:23 -0400
      Re: Limiting # characters in textarea BootNic <bootnic.bounce@gmail.com> - 2013-08-10 21:57 -0400
  Re: Limiting # characters in textarea Norman Peelman <npeelman@cfl.rr.com> - 2013-08-10 19:23 -0400
    Re: Limiting # characters in textarea Twayne <nobody@spamcop.net> - 2013-08-12 13:43 -0400
      Re: Limiting # characters in textarea Norman Peelman <npeelman@cfl.rr.com> - 2013-08-12 18:13 -0400
  Re: Limiting # characters in textarea Jerry Stuckle <jstucklex@attglobal.net> - 2013-08-10 19:36 -0400
  Re: Limiting # characters in textarea Richard Damon <Richard@Damon-Family.org> - 2013-08-10 20:52 -0400
    Re: Limiting # characters in textarea Twayne <nobody@spamcop.net> - 2013-08-12 13:48 -0400
  Re: Limiting # characters in textarea Allodoxaphobia <knock_yourself_out@example.net> - 2013-08-11 16:39 +0000

csiph-web