FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Limiting # characters in textarea
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Limiting # characters in textarea [message #182534 is a reply to message #182531] Sun, 11 August 2013 01:57 Go to previous messageGo to previous message
BootNic is currently offline  BootNic
Messages: 10
Registered: November 2010
Karma:
Junior Member
In article <ku6i1b$rdl$1(at)speranza(dot)aioe(dot)org>, Twayne <nobody(at)spamcop(dot)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*
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Sexy CATHERINE ZETA JONES Sex Scandals
Next Topic: Email attachment 0bytes using php4
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Sep 19 23:27:36 GMT 2024

Total time taken to generate the page: 0.04777 seconds